package
Test if something is a Symbol. Works with either native or polyfill Symbols.
npm install issymbolGitHub-flavored package documentation.
Across all versions, last 30 days.
40 in 30 days
Runtime metadata.
Tagged topics.
issymboltests if something is a Symbol. Works with either native Symbol or polyfill Symbol.
npm install --save issymbolconst 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');
// → falseCode for issymbol originated from https://github.com/medikoo/es6-symbol/.
MIT