Mohammad Asif cf937194cb Removed un-waned things 1. | hace 5 meses | |
---|---|---|
.. | ||
.github | hace 5 meses | |
test | hace 5 meses | |
.editorconfig | hace 5 meses | |
.eslintignore | hace 5 meses | |
.eslintrc | hace 5 meses | |
.gitattributes | hace 5 meses | |
.nycrc | hace 5 meses | |
CHANGELOG.md | hace 5 meses | |
LICENSE | hace 5 meses | |
README.md | hace 5 meses | |
index.js | hace 5 meses | |
package.json | hace 5 meses |
Is this value a JS Set? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
var isSet = require('is-set');
assert(!isSet(function () {}));
assert(!isSet(null));
assert(!isSet(function* () { yield 42; return Infinity; });
assert(!isSet(Symbol('foo')));
assert(!isSet(1n));
assert(!isSet(Object(1n)));
assert(!isSet(new Map()));
assert(!isSet(new WeakSet()));
assert(!isSet(new WeakMap()));
assert(isSet(new Set()));
class MySet extends Set {}
assert(isSet(new MySet()));
Simply clone the repo, npm install
, and run npm test