cmy a6e36702ec 2023-3-1 2 years ago
..
.github a6e36702ec 2023-3-1 2 years ago
test a6e36702ec 2023-3-1 2 years ago
.editorconfig a6e36702ec 2023-3-1 2 years ago
.eslintignore a6e36702ec 2023-3-1 2 years ago
.eslintrc a6e36702ec 2023-3-1 2 years ago
.nycrc a6e36702ec 2023-3-1 2 years ago
CHANGELOG.md a6e36702ec 2023-3-1 2 years ago
LICENSE a6e36702ec 2023-3-1 2 years ago
README.md a6e36702ec 2023-3-1 2 years ago
index.js a6e36702ec 2023-3-1 2 years ago
package.json a6e36702ec 2023-3-1 2 years ago

README.md

is-symbol Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Is this an ES6 Symbol value?

Example

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'))));

Tests

Simply clone the repo, npm install, and run npm test