1.0.0 • Published 24 days ago

@crabas0npm/corporis-tempora-dolores v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
24 days ago

@crabas0npm/corporis-tempora-dolores 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('@crabas0npm/corporis-tempora-dolores');
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

readposearraysstringifyjsdiffenvreduxless compilerpreprocessoruuidFloat64Arrayfixed-widthjson-schemaresolveboundpatheventDispatcherunicodeharmonytrimLeftarrayutilitiesnamesredactmovemake dirrgbeveryObject.definePropertyAsyncIteratorlimitedpropertyobjectexpressiongdprtermdatafastifyreact posehookformdotenvlesscssspinnerinterruptscss variablecryptospecsymlinkworkspace:*Object.fromEntriesregularObservablequeuerangeerrorinspectWebSocketsreal-timetoStringTagpostcss-pluginlinewrapstreamshebangArrayBuffer.prototype.slicemkdirtrimStartmobileformsfunctionsCSSsortedscheme-validationmimeObject.assignStyleSheetspeedcacheenumerableflatMapregular expressionssetPrototypeOfpackage managercalles7nodelibphonenumberwraploggerautoprefixerbundlingrandom$.extendcircularReflect.getPrototypeOfpostcssgenericsfull-widthhigher-orderArray.prototype.includesponyfillparentspackageswgetes-abstractcss-in-jsvaluemimetypesbufferes5limitoptimizerfetchutilityidlecontainsqstouchrfc4122styled-componentsproplookdependency managerWeakSetweakmapeast-asian-widthless csssignalsSymbolgradients css3matchAllmixins0deepclonefind-upphonevalidationpolyfillsuperagentcolorenvironmentstyleMapsymlinksisUint32Arrayiteratemulti-packagestdlibECMAScript 3Array.prototype.containsArray.prototype.findLastformates2017debugtoolkitTypeScriptiteratorObject.ises2015RegExp#flagsintrinsicquerycallbindfseventsargvECMAScript 2021entriesierm -rfzodcore-jspackage.jsonwatcherjson-schema-validatorauthenticationairbnbtapjson-schema-validationUint8ClampedArrayurlstyleguideform-validationregexpES7i18nYAMLgroupio-tsreusefunctionalformreadableeslintconfigreact-hooksstylingTypedArraycompilerInt16Arrayansies-shim API_.extendmapindicatorcodescolumnswordwrapparsereslinttypescriptparentReactiveXstringtestinguser-streamsloadingclientmime-dbsymbolfile systemArray.prototype.filterfast-copyArraytc39classnamesprotofast-clonecurlcss lessdeterministicfromschemasharedwatchinferenceprotobufloggingassertionmacosInt32ArraythreeinternaldescriptorsURLSearchParamsobjcallboundlockfilequeueMicrotask6to5@@toStringTagawesomesauceexpresslazydomgradients cssauthtoolsString.prototype.matchAllES2022esratelimittddinputbootstrap lesskeyseslint-pluginfullmergetypeofimmeroutputshellaccessibilityxtermlintfunctiondeletewhichbyteOffset
1.0.0

24 days ago