Skip to content

seanmonstar/symbol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

ES6 Symbols in your ES5.

Resources

License

Stars

Watchers

Forks

Packages

No packages published