Is this value a Symbol stored in the global cross-realm Symbol
registry?
var isWellKnownSymbol = require('is-well-known-symbol');
var assert = require('assert');
assert(!isWellKnownSymbol(null));
assert(!isWellKnownSymbol(undefined));
assert(!isWellKnownSymbol('foo'));
assert(!isWellKnownSymbol(Symbol()));
assert(!isWellKnownSymbol(Symbol.for('yogurt')));
assert(isWellKnownSymbol(Symbol.iterator));
Simply clone the repo, npm install
, and run npm test