UNPKG

motion

Version:

motion - moving development forward

72 lines (71 loc) 4.31 kB
{ "_args": [ [ "es6-symbol@https://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz", "/Users/nw/flint/packages/flint" ] ], "_from": "es6-symbol@>=2.0.1 <3.0.0", "_id": "es6-symbol@2.0.1", "_inCache": true, "_location": "/es6-symbol", "_phantomChildren": {}, "_requested": { "name": "es6-symbol", "raw": "es6-symbol@https://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz", "rawSpec": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz", "scope": null, "spec": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz", "type": "remote" }, "_requiredBy": [ "/regenerator-runtime-only" ], "_resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz", "_shasum": "761b5c67cfd4f1d18afb234f691d678682cb3bf3", "_shrinkwrap": null, "_spec": "es6-symbol@https://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz", "_where": "/Users/nw/flint/packages/flint", "author": { "email": "medyk@medikoo.com", "name": "Mariusz Nowak", "url": "http://www.medikoo.com/" }, "bugs": { "url": "https://github.com/medikoo/es6-symbol/issues" }, "dependencies": { "d": "~0.1.1", "es5-ext": "~0.10.5" }, "description": "ECMAScript6 Symbol polyfill", "devDependencies": { "tad": "~0.2.1", "xlint": "~0.2.2", "xlint-jslint-medikoo": "~0.1.2" }, "homepage": "https://github.com/medikoo/es6-symbol#readme", "keywords": [ "ecmascript", "es6", "harmony", "private", "property", "symbol" ], "license": "MIT", "name": "es6-symbol", "optionalDependencies": {}, "readme": "# es6-symbol\n## ECMAScript 6 Symbol polyfill\n\nFor more information about symbols see following links\n- [Symbols in ECMAScript 6 by Axel Rauschmayer](http://www.2ality.com/2014/12/es6-symbols.html)\n- [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol)\n- [Specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-constructor)\n\n### Limitations\n\nUnderneath it uses real string property names which can easily be retrieved, however accidental collision with other property names is unlikely.\n\n### Usage\n\nIf you'd like to use native version when it exists and fallback to polyfill if it doesn't (but without implementing `Symbol` on global scope), do:\n\n```javascript\nvar Symbol = require('es6-symbol');\n```\n\nIf you want to make sure your environment implements `Symbol`, do:\n\n```javascript\nrequire('es6-symbol/implement');\n```\n\nIf you strictly want to use polyfill even if native `Symbol` exists (hard to find a good reason for that), do:\n\n```javascript\nvar Symbol = require('es6-symbol/polyfill');\n```\n\n#### API\n\nBest is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-objects). Still if you want quick look, follow examples:\n\n```javascript\nvar Symbol = require('es6-symbol');\n\nvar symbol = Symbol('My custom symbol');\nvar x = {};\n\nx[symbol] = 'foo';\nconsole.log(x[symbol]); 'foo'\n\n// Detect iterable:\nvar iterator, result;\nif (possiblyIterable[Symbol.iterator]) {\n iterator = possiblyIterable[Symbol.iterator]();\n result = iterator.next();\n while(!result.done) {\n console.log(result.value);\n result = iterator.next();\n }\n}\n```\n\n### Installation\n#### NPM\n\nIn your project path:\n\n\t$ npm install es6-symbol\n\n##### Browser\n\nTo port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)\n\n## Tests [![Build Status](https://travis-ci.org/medikoo/es6-symbol.png)](https://travis-ci.org/medikoo/es6-symbol)\n\n\t$ npm test\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git://github.com/medikoo/es6-symbol.git" }, "scripts": { "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", "test": "node ./node_modules/tad/bin/tad" }, "version": "2.0.1" }