peach a19a732be8 commit message | 2 lat temu | |
---|---|---|
.. | ||
.github | 2 lat temu | |
test | 2 lat temu | |
.editorconfig | 2 lat temu | |
.eslintignore | 2 lat temu | |
.eslintrc | 2 lat temu | |
.nycrc | 2 lat temu | |
CHANGELOG.md | 2 lat temu | |
LICENSE | 2 lat temu | |
README.md | 2 lat temu | |
index.js | 2 lat temu | |
package.json | 2 lat temu |
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