forked from panaverse/learn-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
47 lines (47 loc) · 3.43 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
"name": "es6-symbol",
"version": "2.0.1",
"description": "ECMAScript6 Symbol polyfill",
"author": {
"name": "Mariusz Nowak",
"email": "medyk@medikoo.com",
"url": "http://www.medikoo.com/"
},
"keywords": [
"symbol",
"private",
"property",
"es6",
"ecmascript",
"harmony"
],
"repository": {
"type": "git",
"url": "git://github.com/medikoo/es6-symbol.git"
},
"dependencies": {
"d": "~0.1.1",
"es5-ext": "~0.10.5"
},
"devDependencies": {
"tad": "~0.2.1",
"xlint": "~0.2.2",
"xlint-jslint-medikoo": "~0.1.2"
},
"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\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",
"bugs": {
"url": "https://github.com/medikoo/es6-symbol/issues"
},
"homepage": "https://github.com/medikoo/es6-symbol#readme",
"_id": "es6-symbol@2.0.1",
"_shasum": "761b5c67cfd4f1d18afb234f691d678682cb3bf3",
"_resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-2.0.1.tgz",
"_from": "es6-symbol@>=2.0.1 <2.1.0"
}