You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Michael Winter 555e2c196e | 6 years ago | |
---|---|---|
.. | ||
LICENSE | 6 years ago | |
README.md | 6 years ago | |
index.js | 6 years ago | |
package.json | 6 years ago |
README.md
Symbols
ES6 Symbols, in your ES5.
If Symbol
is already defined, it will be used. Otherwise, this implements as much of the Symbol
spec as is possible with plain JavaScript.
Usage
var Symbol = require('symbol');
var key = Symbol();
var obj = {};
obj[key] = 'foo';
console.log(obj[key]); // 'foo'
console.log(Object.keys(obj)); // []