symbol

0.3.1 • Public • Published

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

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i symbol

      Weekly Downloads

      137,570

      Version

      0.3.1

      License

      MPLv2.0

      Last publish

      Collaborators

      • seanmonstar