is-set (2.0.3)
Published 2026-02-24 13:58:39 +00:00 by atheaadmin
Installation
registry=npm install is-set@2.0.3"is-set": "2.0.3"About this package
is-set 
Is this value a JS Set? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Example
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()));
Tests
Simply clone the repo, npm install, and run npm test
Dependencies
Development Dependencies
| ID | Version |
|---|---|
| @arethetypeswrong/cli | ^0.15.0 |
| @ljharb/eslint-config | ^21.1.0 |
| @types/for-each | ^0.3.3 |
| @types/object-inspect | ^1.8.4 |
| @types/tape | ^5.6.4 |
| aud | ^2.0.4 |
| auto-changelog | ^2.4.0 |
| core-js | ^2.6.12 |
| es5-shim | ^4.6.7 |
| es6-shim | ^0.35.8 |
| eslint | =8.8.0 |
| for-each | ^0.3.3 |
| in-publish | ^2.0.1 |
| nyc | ^10.3.2 |
| object-inspect | ^1.13.1 |
| safe-publish-latest | ^2.0.0 |
| tape | ^5.7.5 |
| typescript | next |
Keywords
map
set
collection
is
robust
