@ptkhanh94npm/deleniti-perspiciatis-expedita

1.0.0 • Public • Published

@ptkhanh94npm/deleniti-perspiciatis-expedita Version Badge

github actions coverage License Downloads

npm badge

Is this value a JS WeakSet? This module works cross-realm/iframe, and despite ES6 @@toStringTag.

Example

var isWeakSet = require('@ptkhanh94npm/deleniti-perspiciatis-expedita');
assert(!isWeakSet(function () {}));
assert(!isWeakSet(null));
assert(!isWeakSet(function* () { yield 42; return Infinity; });
assert(!isWeakSet(Symbol('foo')));
assert(!isWeakSet(1n));
assert(!isWeakSet(Object(1n)));

assert(!isWeakSet(new Set()));
assert(!isWeakSet(new WeakMap()));
assert(!isWeakSet(new Map()));

assert(isWeakSet(new WeakSet()));

class MyWeakSet extends WeakSet {}
assert(isWeakSet(new MyWeakSet()));

Tests

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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.00latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.00

Package Sidebar

Install

npm i @ptkhanh94npm/deleniti-perspiciatis-expedita

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

17.8 kB

Total Files

10

Last publish

Collaborators

  • skylerlabsventure