0.3.1 • Published 8 years ago

symbol v0.3.1

Weekly downloads
357,332
License
MPLv2.0
Repository
github
Last release
8 years ago

Symbols

NPM version

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)); // []