1.0.0 • Published 1 year ago

@hoangcung1804npm/reprehenderit-tempora-quaerat v1.0.0

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

@hoangcung1804npm/reprehenderit-tempora-quaerat 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('@hoangcung1804npm/reprehenderit-tempora-quaerat');
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

postcssargssymbolsES2017setframeworkbootstrap csssnsstoragegatewaytypedcss nestingFloat64ArrayairbnbIteratorupbootstrap lesscolorstylesheetInt8ArrayspinnersWeakSetclass-validatorqueuetesternested cssender[[Prototype]]commanderesworkspace:*xtermrequestfind-upkeyeventsJSONarraycachestreamskoreans3schemeObservablesdebuggerpromisecompareidescapeextendlazyapolloSetcollectioneslint-pluginhasindicatorbundlingcloudfront256ES2016ec2taskglobrangeerrorCSSStyleDeclarationoptimistthrottlevalidarktypepyyamlcharactersttyes2015internal slotloggerassertworkflowidlenegativefindprettyweaksetefficientObject.valuesWebSocketspropertylintregexlocationtoolkitcss lessfseventscallbindredactincludesstyleguideless compilerreact-hook-formWebSocketformattingsafeECMAScript 2017passwordstylesrouteeast-asian-widthtelephonenativeforEachgradients csscloudsearchebs@@toStringTagregular expressionobjopenmobileloadinglockfileconcatECMAScript 2020Uint8ArrayTypeBoxsymlinkxhrjoipackage managerclassnamehotfolderrgbajvhas-ownvestES2018recursiveECMAScript 2023rdsstringifierwatchinglogcallbackhookformreadableURLSearchParamsAsyncIteratorrm -frfixed-widthcore-jscall-boundeveryrm -rfrapidutil.inspectpropvaluespicomatchsortedparentsArrayBuffer.prototype.sliceurldeepcopyFunction.prototype.namedatastructureUint8ClampedArraycloudformationsettingsartsimpledbconcatMapjsdominternalstatelesspackage.jsoninspectchineseutilitiesECMAScript 5testingunicodemiddlewaretrimStartnameYAMLvisualgroupenvironmentObject.getPrototypeOfcodesaccessordynamodbwaitArray.prototype.findLastIndexsharedarraybufferes-shimsimmereslintpluginmodulesinputsliceweakmapduplexSymbol.toStringTagfindLastES2020rateassigncolourchromeJSON-Schemakinesisflatmochaformexpresscommand-lineprunebreakextensiondataViewtypeofcreatedirflagvpcargvprivate datawatchFileexecfastifyvalidationESnextpreprocessorawaitprivateMicrosoftentriesdeepcloneArray.prototype.flatroute53yupprototypeform-validationshimregexpmetadatanegative zerocolumnauthinvariantshameventEmitterlinewrapBigInt64Arraycomputed-typesparserwalkstructuredClonearraybufferstylingreact-testing-libraryecmascriptfetchcjktc39browserslisttrimRightwidthpackagesvalidateless.jsperformantdescriptorsmatchpushReflect.getPrototypeOfes8shebangInt32Arrayes6shellfastfast-clonecloudtrailObject.entriespostcss-pluginArray.prototype.includesTypeScriptjsxansigetintrinsictimefast-deep-cloneuninstall0utilitycss-in-jscsssetPrototypeOfwhichcallsqsvariablestoSortedstringifytouchloadbalancingcirculartypedarrayjsdiffsequenceArray.prototype.flattenoutputtools.envimmutabledataviewruntimefast-deep-copycensorECMAScript 3nodemkdirsconfigRegExp.prototype.flagswordwrapjavascript
1.0.0

1 year ago