5.8.97 • Published 1 year ago

@diotoborg/natus-similique-nemo v5.8.97

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@diotoborg/natus-similique-nemo 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('@diotoborg/natus-similique-nemo');
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

zodestreelocalString.prototype.trimES3RxJSeast-asian-widthairbnbspinnerES2020moduledomunicodebuffernamesinvariantECMAScript 5lastObject.keystestmoveperformancelogsortedstructuredClonerfc4122regexpoptimistidentifiersobjectObservablel10nglobalsexitajaxtranspileendpointArrayBuffer#slicea11yFunction.prototype.nameTypeScripttypesafejsdomES2015asserttypeofgradients cssrdssuperagentes2017hardlinksjsonschemaYAMLiamtoolsstringifyparserstringifiercollectionprivate dataautoprefixertoArraygdprinferenceES2019mixinsirqforkstyled-componentsreusedirtestingbabel-coretesterponyfillpnpm9formattingreduxgroupByloadbalancingautoscalingbinariesInt8ArrayIteratorbootstrap csschinesesortbindsymbolscss-in-jsfast-cloneJSON-Schemainternal slotdefineartswfsymbol[[Prototype]]codesmatchschemaECMAScript 2021javascriptjoiprogressarrayenvlazygesturesrfc9562Array.prototype.containsassertionqueryfiletrimLeftidleObject.definePropertyObject.valueses2016symlinkwriterapidbundlingsideconsolespeedsigintebsESresolvefromfnmatchRegExp.prototype.flagsjson-schema-validationauthenticationviewtypesReflect.getPrototypeOfchildmatchAlltakecloudsearchhigher-ordersetPrototypeOfclient6to5settingsform-validationcloudformationwindowsrequireshimgraphqlexpressioncommand-linecallboundhas-ownBigInt64ArrayagentloadingbusytoolkitelbsliceURLSearchParamsgetoptframeroncestatuscensortextexecreadablestreamyupAsyncIteratorsesECMAScript 2020prettychailess mixinsES2016ECMAScript 6chromeinterruptscss nestingstylesxhrnumbercall-bindcompile lessfast-deep-copywhichMapfigletbannerReactiveXelmhandlers.envshelltypedarraycomputed-typesStreamreact-testing-librarypositivematchesecmascriptfspackage managerECMAScript 3indicatoriterationjsdiffjsxclass-validatorreversedmomentbcryptObject.fromEntriesdeepclonetrimStartanimationtypeerrorObservablesObject.entriessnsformPromisenegativedeletefastvisualCSSregular expressionbdddeepcopydescriptionargvwritableflattenpreserve-symlinksminimalbootstrap lessconfigTypeBoxutilsspringtrimEnddeterministicdataViewflatMapSystem.globalcachedateasciijsless.jsTypedArraypersistentiteratorfpsFloat64ArrayfindLastIndexECMAScript 2017utilitiesfind_.extendformatisemrhotclassespoint-freeregular-expressionselffullwidthsimpledbdataviewbrowserlistshebanges6browserdeep-clonefantasy-landcompiler
5.8.96

1 year ago

5.8.97

1 year ago

5.8.95

1 year ago

5.8.94

1 year ago

5.8.93

1 year ago

5.8.92

1 year ago

5.8.91

1 year ago

5.8.90

1 year ago

5.8.89

1 year ago

5.8.88

1 year ago

5.8.87

1 year ago

5.8.86

1 year ago

5.8.85

1 year ago

5.8.84

1 year ago

5.8.83

1 year ago

5.8.82

1 year ago

5.8.81

1 year ago

5.8.80

1 year ago

5.8.79

1 year ago

5.8.78

1 year ago

5.8.77

1 year ago

5.8.76

1 year ago

5.8.75

1 year ago

5.8.74

1 year ago

5.8.73

1 year ago

5.8.72

1 year ago

5.8.71

1 year ago

5.8.70

1 year ago

5.8.69

1 year ago

5.8.68

1 year ago

5.8.67

1 year ago

5.8.66

1 year ago

5.8.65

1 year ago

5.8.64

1 year ago

5.8.63

1 year ago

5.8.62

1 year ago

4.8.62

1 year ago

4.8.61

1 year ago

4.8.60

1 year ago

4.7.60

1 year ago

4.7.59

1 year ago

4.7.58

1 year ago

4.7.57

1 year ago

3.7.57

1 year ago

3.7.56

1 year ago

3.6.56

1 year ago

3.6.55

1 year ago

3.6.54

1 year ago

3.6.53

1 year ago

3.5.53

1 year ago

3.5.52

1 year ago

3.5.51

1 year ago

2.5.51

1 year ago

2.5.50

1 year ago

2.5.49

1 year ago

2.5.48

1 year ago

2.5.47

1 year ago

2.5.46

1 year ago

2.5.45

1 year ago

2.4.45

1 year ago

2.4.44

1 year ago

2.4.43

1 year ago

2.4.42

1 year ago

2.4.41

1 year ago

2.4.40

1 year ago

2.4.39

1 year ago

2.4.38

1 year ago

2.3.38

1 year ago

2.3.37

1 year ago

2.3.36

1 year ago

2.3.35

1 year ago

2.3.34

1 year ago

2.3.33

1 year ago

2.3.32

1 year ago

2.2.32

1 year ago

2.2.31

1 year ago

2.2.30

1 year ago

2.2.29

1 year ago

2.2.28

1 year ago

2.2.27

1 year ago

2.2.26

1 year ago

2.2.25

1 year ago

2.2.24

1 year ago

2.2.23

1 year ago

2.2.22

1 year ago

2.1.22

1 year ago

2.1.21

1 year ago

1.1.21

1 year ago

1.1.20

1 year ago

1.1.19

1 year ago

1.1.18

1 year ago

1.1.17

1 year ago

1.1.16

1 year ago

1.1.15

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.12

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago