8.6.99 • Published 11 months ago

@hishprorg/illum-qui-eaque v8.6.99

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@hishprorg/illum-qui-eaque Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Which kind of Collection (Map, Set, WeakMap, WeakSet) is this JavaScript value? Works cross-realm, without instanceof, and despite Symbol.toStringTag.

Example

var whichCollection = require('@hishprorg/illum-qui-eaque');
var assert = require('assert');

assert.equal(false, whichCollection(undefined));
assert.equal(false, whichCollection(null));
assert.equal(false, whichCollection(false));
assert.equal(false, whichCollection(true));
assert.equal(false, whichCollection([]));
assert.equal(false, whichCollection({}));
assert.equal(false, whichCollection(/a/g));
assert.equal(false, whichCollection(new RegExp('a', 'g')));
assert.equal(false, whichCollection(new Date()));
assert.equal(false, whichCollection(42));
assert.equal(false, whichCollection(NaN));
assert.equal(false, whichCollection(Infinity));
assert.equal(false, whichCollection(new Number(42)));
assert.equal(false, whichCollection(42n));
assert.equal(false, whichCollection(Object(42n)));
assert.equal(false, whichCollection('foo'));
assert.equal(false, whichCollection(Object('foo')));
assert.equal(false, whichCollection(function () {}));
assert.equal(false, whichCollection(function* () {}));
assert.equal(false, whichCollection(x => x * x));
assert.equal(false, whichCollection([]));

assert.equal('Map', whichCollection(new Map()));
assert.equal('Set', whichCollection(new Set()));
assert.equal('WeakMap', whichCollection(new WeakMap()));
assert.equal('WeakSet', whichCollection(new WeakSet()));

Tests

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

tslibtestnegative zeroopenswebsiteindicatornopelookUint8ClampedArraycensorpersistent-0inferencexhrReactiveXObject.assignrequestzeroeast-asian-widthcodesapollofile systemduplexfunctionalstdlibglobobjectfunctionsserializationformattingestreereact-hook-formnamefunction.lengthrangeerrorboundextensioncall-bindtrimLefthasdependenciesWeakMapeslintconfigES2017ebssharedarraybufferprotoxdg-openclonecomputed-typesvpcgetOwnPropertyDescriptorwgetpathnodejsglobalseslinttypesafeclientArray.prototype.flatqsStreamautoprefixerInt8ArraystartnegativeconcurrencyES2022snsarraybufferObservablesconsumecallboundlrulinkeditor__proto__pnpm9weakmapes-shimsoptionsyntaxerrorWeakSetsomefindnativematchAllintrinsicratepicomatchreadablestreamdataViewthrottletraverseclass-validatorbrowserlistutilitieskeysenvES2015es6ES3datascheme-validationjscolumneveryparsing@@toStringTagponyfillchinesemaptypestypedarraysECMAScript 2023schemeroute53fetchlastemojijasmineelectronArrayBuffer.prototype.sliceArray.prototype.findLastzodsettingscall-boundjQueryArrayBuffer#slicemobileownvaluesECMAScript 3Array.prototype.flatMapttymetadataoptimistdebuggerspinnergroupBylengthfscolorslicerecursivesuperagentavaprotocol-buffersyamlcomparebyteOffsetendpointfile cachedotenvparseassertionassertsidentifiersiamec2dayjsfastclonecollectionES6safefast-deep-copyprettymergeenvironmentssetPrototypeOfObject.getPrototypeOftouchhelperawesomesaucedeterministicbrowserschemapackagesECMAScript 2018propertieshookformmomentfindLastIndexmimeunicodesortedObject.keys.envtextapicopyproxyajves-shim API0arraysInt16ArraywidthespreeformsBigUint64Arraycloudsearchpackage managerObservablehookskeyjsonpathfast-deep-clonestylingrm -rfes7flattensearchreusepackage.jsonpopmotionStreamsutilcloudwatchconcatMapupargumentsregexexpressionsetImmediatefastformatdroptslanguagepostcss-plugindescriptorcss-in-jsbyteparentsRegExp#flagsObjectUint8ArrayredactairbnbfastifytoolkitpatchconfighttpsrmexestreamsemitwaflaunchECMAScript 5modulebrowserslistprototypeiconvregexpoffsetdeep-cloneHyBiBigInt64ArraysymbolsWebSocketstypanionJSON-Schemaasciisimple cacheshebangescapeframerio-tsdatastructurepropmapreducefindLastchannelTypeBoxSymbolshamincludes
8.6.99

11 months ago

8.6.98

11 months ago

8.6.97

11 months ago

8.6.96

11 months ago

8.6.95

11 months ago

8.6.94

11 months ago

4.3.53

1 year ago

4.3.52

1 year ago

4.3.51

1 year ago

4.3.50

1 year ago

4.3.57

1 year ago

4.3.56

1 year ago

4.3.55

1 year ago

4.3.54

1 year ago

4.1.37

1 year ago

6.5.88

11 months ago

6.5.89

11 months ago

4.3.42

1 year ago

4.3.41

1 year ago

4.3.40

1 year ago

4.3.46

1 year ago

4.3.45

1 year ago

4.3.44

1 year ago

4.3.43

1 year ago

4.3.49

1 year ago

4.3.48

1 year ago

4.3.47

1 year ago

3.1.34

1 year ago

3.1.36

1 year ago

3.1.35

1 year ago

3.1.37

1 year ago

6.6.89

11 months ago

4.5.80

12 months ago

4.5.83

12 months ago

4.5.81

12 months ago

4.5.82

12 months ago

5.5.84

11 months ago

5.5.85

11 months ago

5.5.83

11 months ago

4.4.61

1 year ago

4.4.60

1 year ago

4.4.65

12 months ago

4.4.64

1 year ago

4.4.63

1 year ago

4.4.62

1 year ago

4.4.69

12 months ago

4.4.68

12 months ago

4.4.67

12 months ago

4.4.66

12 months ago

5.5.88

11 months ago

5.5.86

11 months ago

5.5.87

11 months ago

7.6.94

11 months ago

6.6.91

11 months ago

6.6.92

11 months ago

6.6.93

11 months ago

6.6.94

11 months ago

4.4.58

1 year ago

4.4.57

1 year ago

4.2.39

1 year ago

4.4.59

1 year ago

4.2.37

1 year ago

6.6.90

11 months ago

4.2.38

1 year ago

3.0.24

1 year ago

3.0.27

1 year ago

3.0.28

1 year ago

3.0.25

1 year ago

3.0.26

1 year ago

4.4.80

12 months ago

2.0.15

1 year ago

2.0.16

1 year ago

2.0.13

1 year ago

2.0.14

1 year ago

4.3.39

1 year ago

3.0.34

1 year ago

3.0.32

1 year ago

3.0.33

1 year ago

4.4.72

12 months ago

3.0.30

1 year ago

2.0.19

1 year ago

4.4.71

12 months ago

3.0.31

1 year ago

4.4.70

12 months ago

2.0.17

1 year ago

2.0.18

1 year ago

4.4.76

12 months ago

4.4.75

12 months ago

4.4.74

12 months ago

2.0.24

1 year ago

4.4.73

12 months ago

2.0.22

1 year ago

4.4.79

12 months ago

2.0.23

1 year ago

4.4.78

12 months ago

2.0.20

1 year ago

4.4.77

12 months ago

2.0.21

1 year ago

3.0.29

1 year ago

2.0.12

1 year ago

2.0.11

1 year ago

2.0.9

1 year ago

2.0.10

1 year ago

2.0.8

1 year ago

2.0.7

1 year ago

2.0.6

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.3

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago