npm

Does your artifact manager get in the way? Join us on Oct. 8 at 10am PT, to discuss how npm can help.Sign up »

es-symbol

1.1.2 • Public • Published

es-symbol

A spec-compliant as much as it could be, small, and tested ES6 Symbol implementation.

NPM version Build Status Coverage Status Dependency Status

  • No unnecessary dependencies
  • Works in node + browser (IE8--Modern browsers)
  • Uses native Symbol if possible otherwise exports a polyfill

Usage

npm install es-symbol
var Symbol = require('es-symbol')
 
var sym = Symbol('foo')
 
var obj = {}
obj[sym] = 'hello'
 
// The following are true
obj.foo === undefined
obj[sym] === 'hello'

Disclaimer: This depends on ES5. If you need to support legacy browsers consider using an ES5 shim.

More information

Symbol Spec

Symbols in ECMAScript 6

License

MIT

install

npm i es-symbol

Downloadsweekly downloads

847

version

1.1.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability