2.0.3 • Published 1 month ago

is-weakset v2.0.3

Weekly downloads
971,994
License
MIT
Repository
github
Last release
1 month ago

is-weakset 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('is-weakset');
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

@infinitebrahmanuniverse/nolb-is-w@saaspe/componentsexpand-react-bridgeluminos-ui-coresklif-ui-kitsklif-api@everything-registry/sub-chunk-1935jawwy-sdkjawwy_gamification_release@deepakorg/test@deepak757/testreact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgp149-tablesklif-uimachinebeemrcapsreact-native-jawwy_samplejawwy_library_newjawy_library_v1gamification-jawwy-libraryframework_test_library_sixdee_new_jawwytest_lib_module_aarzzzxxxyyy321123ronaldocr7vibes@girhan/mokorusferridwangonzales84rn-agora-ios-mrn-check-btnelvirarn-circular-charterlocogonzales08erikoalam@hieuquang2212/formes-react-bridgerofiqenefti-galerisabugratissalahudincarlo29sambalado29sambelijofbkocakfawaterak-online-paymentfawatrak-online-paymentferlinanons23fernandotorest45scopexxtrusendaljepitserenitymeangle21faturohmanshisuitearxshineinajashineinbossergiobesquest34@idas1/ui-component-libsergekayamba92@ifanshx/cycgodsreact-voice-actionsreact-wizard-viewer@eki-group/svelvetreact-tailwindcss-datepicker-costume-2@firstday/firstdaytehreactnativelyreactofy-css-librarydynamics-contracts-xreggaeman22@gericuz/tea-fairlyreact-native-responsive-helperreact-native-withframework-check@epigraph/epigraph-analytics@extrieve_technologies/quickcapture_react_nativereact-plugin-package-corereact-router-v5-v6-bridged-featuresshaina@imrtoy/homebridge-night-light@img-arena/img-ui-mui-theme@img-arena/ui-coresgbteamnewerafalcata-appsenggoldongestehsusuetdahsusahflaresss@jleiva/signer-jwt@joaquinmr99/calculadoraslebewfranklampard45gamification-integration-newgalangpramono253galihariwanda29gassefals-2gassefalsgaskeunlahcuy20gaskeunnnmamangsrnodetprojectginminegeulis94
2.0.3

1 month ago

2.0.2

2 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.1

9 years ago

1.0.0

9 years ago