Skip to content

Test if something is a Symbol. Works with either native or polyfill Symbols.

License

Notifications You must be signed in to change notification settings

dashed/issymbol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

issymbol Build Status

issymbol tests if something is a Symbol. Works with either native Symbol or polyfill Symbol.

Usage

npm install --save issymbol
const issymbol = require('issymbol');

// works with any native Symbol implementation
issymbol(Symbol());
// → true

// also works with your favourite polyfill
const core = require('core-js/library');
issymbol(core.Symbol());
// → true

// returns false any input that is not a Symbol
issymbol('not a symbol');
// → false

Credit

Code for issymbol originated from https://github.com/medikoo/es6-symbol/.

License

MIT

About

Test if something is a Symbol. Works with either native or polyfill Symbols.

Resources

License

Stars

Watchers

Forks

Packages