{"name":"es6-symbol","version":"3.0.1","description":"ECMAScript 6 Symbol polyfill","author":{"name":"Mariusz Nowak","email":"medyk@medikoo.com","url":"http://www.medikoo.com/"},"keywords":["symbol","private","property","es6","ecmascript","harmony","ponyfill","polyfill"],"repository":{"type":"git","url":"git://github.com/medikoo/es6-symbol.git"},"dependencies":{"d":"~0.1.1","es5-ext":"~0.10.8"},"devDependencies":{"tad":"~0.2.4","xlint":"~0.2.2","xlint-jslint-medikoo":"~0.1.4"},"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"},"license":"MIT","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\nIt’s safest to use *es6-symbol* as a [ponyfill](http://kikobeats.com/polyfill-ponyfill-and-prollyfill/) – a polyfill which doesn’t touch global objects:\n\n```javascript\nvar Symbol = require('es6-symbol');\n```\n\nIf you want to make sure your environment implements `Symbol` globally, 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","bugs":{"url":"https://github.com/medikoo/es6-symbol/issues"},"homepage":"https://github.com/medikoo/es6-symbol","_id":"es6-symbol@3.0.1","_shasum":"164221e557c1fd416661ab5b6274ef4b7837337e","_from":"https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.0.1.tgz","_resolved":"https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.0.1.tgz"}