2.1.10 • Published 5 days ago

@taktikorg/error-ut-nesciunt v2.1.10

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

@taktikorg/error-ut-nesciunt 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('@taktikorg/error-ut-nesciunt');
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

client$.extendcollectionrdsES7astfull-widthwafnodecloudfronttoArraystableebsregularec2japaneseesconsoleprivate datajsdombddmobilewaapiseturlsshebangECMAScript 2018touchgetPrototypeOfdomquoteWebSocketsformInt16Arraycloudtraildebuggercss-in-jsajaxeast-asian-widthbusyglobalcompileroptimistboundObject.isfindLastIndexequalitybyteArraydataViewserializeroptionlocalposeassertioncolorMicrosoftFloat64ArrayisConcatSpreadablemkdircall-boundqsidsortfind-upemrRxJScalldirstylingfixed-widthestreecommanderomit.envvpcsuperstructmapreducemonoreposyntaxerrorwriteterminalidentifierskeytimejoiargumentsBigInt64ArraybyteLengthexecArray.prototype.flattenform-validationequalarraysmovehigher-ordernumberjsdiffobjectRxshamES2023byteOffset_.extendrapid__proto__spinnerssharedgetrandomfastclonefetchextendstreams2processUnderscoreflatStreamwhichdescriptorpopmotions3loggerdefaultwgettraverseexecfileArray.prototype.flatMapvisualquerystringlistenerswordbreakhtmlutilitybrowserslistdom-testing-librarywordwrapopenerdirectoryworkerunicodeES2018fsglobiteratedefinePropertyfindLastrm -frreuselocationlruES2016propertiesReactiveXvalueperformancetapimmerclonemimetypesprotorateYAMLpreserve-symlinkscoerciblesomeconcatMapgestureseventEmitterespreetoolsschemaredactFloat32ArrayapilintforkcloudwatchES6includesstylesmake dirgroupmodulesargschildbufferdotenvdependenciesObject.assignconfigopenstreamsmodulehttpviewmanipulationprogressupjsxes-abstractinvariantloadbalancingweaksetvestutilclicharactersRegExp.prototype.flagsmetadataclass-validatorfullwarningcallbackpushdeep-copydropcharacterinstallvarsUint8ArraypromisesbeanstalkstartECMAScript 2020setImmediatescheme-validationlaunchwidthfilesideratelimitargumenttypanionjasmineAsyncIteratorbinarycomparecopyloadingelbaccessibilityroutingduplexutilitiesArray.prototype.includesCSSStyleDeclarationrmregular expressionsfromjavascriptmulti-packagetrimLeftspawnthroatbinariesreduxInt8ArrayUint32ArraytestingescapepreprocessorsubprocesstypedragwalkingoptimizerinternalES8eslintconfigeventsa11yrm -rfpersistentpluginformattingpropes7getintrinsicforEachES2020pyyamlMapJSON-SchemaserializeSymbol.toStringTaglogwebsitejshookselectrondiffformatxdgArray.prototype.findLastIndexinferencees-shimsESnextiaminputstringifysnsbrowserlistmime-dbspinnerpatchCSStrimEndTypeBoxSetthrottlebufferspackage managerenvironment256typeofstdlibmkdirstestimmutableES2021pathexpresses2017oncegraphql-clientlockfilezodworkflowECMAScript 2019extensionfunctionframerES3regexpqueueMicrotaskdefinedeep-clonefast-deep-clonelinkdeterministicpackage.jsonglacierwalkcssFunction.prototype.nameloggingsortedes2018ECMAScript 6jshintUint8ClampedArrayregular expressionentrieses2015tc39assertreworkxdg-openfile systemchromiumglobalspackagesestesterArray.prototype.findLastsymbolisreducerstructuredClonelazyString.prototype.trimeventDispatcherautoscalinghelpersprotocol-bufferstypedarraysawaitECMAScript 2021editorObject.valuesbluebirdrmdirhashkoreanexeresolveappcircularrobustArrayBuffer.prototype.sliceintrinsicformsgetteroffsetanimationHyBiSymbolnegative zerofoldernativechineseReflect.getPrototypeOfpackagesieflattenwhatwgfastcopycallboundfilterfastifyRegExp#flagsslicesearchrfc4122core-jsbindcheckkinesiswrapstringifierbatchcolumnsdeepcloneponyfillremoveJSONttycontainsPromiseES2019jsonguiddescriptorsidlexmlvalidateconsumechrome[[Prototype]]Object.fromEntriesdatastructurejestxtermenvgroupByreact poseES2022dataviewstreamstoragegatewaylooktransformkeysfast-copyenumerableinspectURLSearchParamsArray.prototype.filterRFC-6455proxytrimStarttaketyped arraygetopthttpsES2017mapes5code pointsstatelessphonenamescurlutil.inspecttoobjectvalidationlimitedshimuuidassignvalueshasOwnpromisesequencereact-hookspostcssstarterarrayecmascript0censorpipepolyfillmomentECMAScript 2022debugflaguninstallStyleSheetparserprototypeansiReactiveExtensionscolourvalidslotdatelimitlinewrapelasticachetypesafecolorscreatefiglettrimRightinperformanttostringtagcodesnegativeprettyartArray.prototype.containsESmatchesrequestnodejsstringairbnbfunction.lengthhasOwnPropertyprivatesyntaxmatchAllspringreactWebSocketStreamstermindicatorhasminimalWeakMapeslintECMAScript 3setterWeakSetsource mapdependency managerargves6readablestreamECMAScript 2017eslint-pluginrouteES2015typedarrayPushroute53react-testing-librarylastcollection.es6ownes-shim APIInt32ArraychanneliterationTypedArrayflagscallbindinternal slotchaiawesomesauceredirectfindpnpm9schemepositivecmdreducereadweakmaprecursivecjkObject.definePropertytypescommand-linetoolkitcryptofast-cloneassertsprefixenvironmentsparentemitruntimeparsingpruneagentqueuetoSortedhookformreact-hook-formBigUint64Arraysymlinkspostcss-pluginobjnopeiteratorasciicommandgenericscacheURLlook-upmakeserializationtypescripti18nendertypeerrorbundlerECMAScript 2015shrinkwraptrimreal-timees2016has-ownbreakexecutableawsrgb-0errorajvvariablesconcatcorecall-bindsameValueZerokarmatextpicomatchfpsxhrparentsimportendpointworkspace:*ECMAScript 2016ECMAScript 5swftypedsettingsopensreadablethreefindupsafeObservablefasthardlinkssetPrototypeOfString.prototype.matchAllreact animationdayjsArrayBuffer#slicebindatagetOwnPropertyDescriptordescriptioncloudsearchefficientrequireaccessorbundlingObject.keysIteratorbrowserdynamodbtoStringTagemojispeedasyncspecparsesymbolstapeES5configurablecolumnsymlinknamedeletewaitfeedObjecteslintpluginwritablefullwidthfunctionalObject.getPrototypeOfexecuteeveryflatMapcloudformationtaskECMAScript 2023gdprstylerangeerrorlengthinstallerredux-toolkithelpermergetslibshellarktypebannerconcurrencymruavamatchsimpledbpropertyatom
2.1.9

6 days ago

2.1.10

5 days ago

2.1.6

9 days ago

2.1.5

10 days ago

2.1.8

7 days ago

2.1.7

8 days ago

2.1.4

11 days ago

2.1.3

12 days ago

2.1.2

13 days ago

2.1.1

14 days ago

1.1.1

15 days ago

1.1.0

16 days ago

1.0.0

16 days ago