Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anthonyshort/symbol
ES6 Symbol shim thing
https://github.com/anthonyshort/symbol
Last synced: 24 days ago
JSON representation
ES6 Symbol shim thing
- Host: GitHub
- URL: https://github.com/anthonyshort/symbol
- Owner: anthonyshort
- Created: 2013-03-31T06:49:18.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-03-31T06:49:36.000Z (over 11 years ago)
- Last Synced: 2024-04-15T03:16:22.613Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 125 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# symbol
Polyfill for ES6 symbols for ES5 browsers. Originally written by [Andrea Giammarchi](http://webreflection.blogspot.com.au/2013/03/simulating-es6-symbols-in-es5.html). I just made it into a Component so I can use it easily.
## Installation
$ component install anthonyshort/symbol
## API
var Symbol = require('symbol');
var data = {};
var hidden = new Symbol();
data[hidden] = "Secret files";
console.log(data); // {}
console.log(data[hidden]); // "Secret files";## License
MIT