Bakhtina Sofya b84cb877be 1st comm | hai 3 semanas | |
---|---|---|
.. | ||
.github | hai 3 semanas | |
test | hai 3 semanas | |
.editorconfig | hai 3 semanas | |
.eslintignore | hai 3 semanas | |
.eslintrc | hai 3 semanas | |
.nycrc | hai 3 semanas | |
CHANGELOG.md | hai 3 semanas | |
LICENSE | hai 3 semanas | |
README.md | hai 3 semanas | |
index.js | hai 3 semanas | |
package.json | hai 3 semanas |
Is this an ES6 Symbol value?
var isSymbol = require('is-symbol');
assert(!isSymbol(function () {}));
assert(!isSymbol(null));
assert(!isSymbol(function* () { yield 42; return Infinity; });
assert(isSymbol(Symbol.iterator));
assert(isSymbol(Symbol('foo')));
assert(isSymbol(Symbol.for('foo')));
assert(isSymbol(Object(Symbol('foo'))));
Simply clone the repo, npm install
, and run npm test