Irina Glushko 2389e7160b HW1 done | 3 anni fa | |
---|---|---|
.. | ||
.github | 3 anni fa | |
test | 3 anni fa | |
.editorconfig | 3 anni fa | |
.eslintignore | 3 anni fa | |
.eslintrc | 3 anni fa | |
.nycrc | 3 anni fa | |
CHANGELOG.md | 3 anni fa | |
LICENSE | 3 anni fa | |
README.md | 3 anni fa | |
index.js | 3 anni fa | |
package.json | 3 anni fa |
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