is-set ![Version Badge](https://camo.githubusercontent.com/2fc47f9199a9e7c3512aab7f5054239dfc9936dae920a2a68d072be0906c6386/68747470733a2f2f76657273696f6e626164672e65732f696e73706563742d6a732f69732d7365742e737667)
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