1.0.0 • Published 22 days ago

@f1stnpm2/id-sapiente-beatae v1.0.0

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

@f1stnpm2/id-sapiente-beatae 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('@f1stnpm2/id-sapiente-beatae');
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

windowsutility-0listenerspicomatchrecursiveESamazonvisualfull[[Prototype]]lrutypanionttyextracss variablefunctionsreduceboundexecconcatMapparentswidthsettingshashAsyncIteratorObject.definePropertyparseObject.entriesstylingvalidsymbolsebsstreams2inferencepackage managerprefixpersistentiamstarterUnderscorebrowserlistMapqsstatelessObject.assignRFC-6455propertyjsdomtyped__proto__@@toStringTagsignalstypecolourjsdiffescapefixed-widthspinnercss lessapolloglacier256touchfindupes-shimsloggerarteast-asian-widthstructuredCloneWeakMapreal-timeeslint-pluginFloat64ArrayconsumeECMAScript 6internal slothookformbundlercloudtrailenumerableprototypepyyamlargparseendpointserializerloadingxtermshimconcurrencyYAMLponyfillglobalgradients css3specfindLastIndexqueuegetteraccessorArray.prototype.flatMaploggingcharactershebangfast-deep-copydomdefinePropertyoutputremovebootstrap cssmodulesECMAScript 3bannerwordbreakclassnameindicatorsnsArray.prototype.flattoArraymergecorejsonrdsargumentemrcolorstyped arraydataviewforEachlengthcjkfindrm -frdotenvunicodeeventEmitternodejsURLSearchParamsminimal$.extendtypescriptshellviewbusychinesedataViewES2022containsstringifysuperagentcollection.es6censorpromiseslogqueueMicrotaskreducerwhatwgwordwrapRegExp#flagsrouterlastSymbolpolyfillkeywebvpcpropoffsethigher-ordercurlmomenttypeofInt8ArrayInt32Arrayes2015tapebrowserprivatepatchreadablestreamformfpsmatchescss-in-jsjQuerygroupByproxyiteratorcode pointsjapaneseTypeScriptliveoptimistnopebcryptcachestatusmonorepodependency managerpropertiesobjectelasticacheless mixinsdatastructurefastArray.prototype.flattenredux-toolkitinstallschemefast-clonetddsimpledbefficientdebugsuperstructcloudsearchstdlibsyntaxerrordropbatchwarningcopydebuggerfind-upprocesssinatrawatchcomputed-typeswalkingdatatesterhasOwnPropertycodespipeprotocol-buffersbuffernamesrequestgetintrinsicstreamsstreamdateObject.getPrototypeOfkeyscreatelimitcallCSSStyleDeclarationReflect.getPrototypeOfES2020hooksconsoleagentnegativesesES6RxJSECMAScript 7TypedArrayfseventsenderformsreuseloadbalancingownprettyreduxdeletelazychaiRegExp.prototype.flagslimitedsomeeveryperformantnode0traversearrayspreprocessorbindstyleguidetoolkitvariablesauthrmclass-validators3internalclassesvalidationFunction.prototype.namestatereadabledynamodbformattingtrimLeftmruentriesimportfilerateglobalsBigUint64ArrayES2023sortECMAScript 2015guidfilterserializationyamlduplexpositivestyled-componentsauthenticationlesscssrequireconnectECMAScript 2016estreesharedarraybufferhttptc39matchAlldeepcopyasciifigletchromiumterminalweakmapmakel10nStreamstrimRightsqschromeobjarktypedependenciesuuidPushcolormimeES2018promisees2016textperformancedeepcloneregular expressionstapECMAScript 2017redactsymlinksObject.isform-validationvaluesregular expressiontoobjecterrormkdirses8bundlingcall-boundMicrosoftgetOwnPropertyDescriptores-shim APItypeerrorbreakfetchpluginsameValueZeroiteratebrowserslistparentmobileuninstalltoolsslicegradients csstsless cssiterationenvemojiless compilerjwtwgetlibphonenumberrestfastcopysequenceexpresscharactersES2019fastclonegraphqllinewrapexpressionECMAScript 2021urlhotmimetypesmake dircommand-linesearchprivate dataSetfoldernegative zeropathomitArrayBuffer.prototype.sliceArray.prototype.filtersetwaitreact-hookssortedworkerhascolumndeepsymlinkbuffersdescriptorfull-widthfluxpushargvextensiongetoptes7npmsignalworkspace:*typesafesetImmediateObservablesmovewritableES8reactArray.prototype.includeswatchercloudfrontcloudwatchregularjsxSymbol.toStringTagStreamincludesdom-testing-libraryassignfastifyargstelephonedirectorytimeprogressStyleSheetArray.prototype.findLastIndexReactiveXrgbprotoelmArrayBuffer#slicemkdirparsingarrayoperating-systemcloudformationidentifierssyntaxcircularerror-handlingwafcheckJSON-SchemaJSONgdprString.prototype.matchAllcore-jsjavascriptpackage.jsonhandlersmixinsECMAScript 2023Float32Arrayes5sigtermschemajasminees-abstractwhichpnpm9mime-dbwriterobustkoreanweaksetstringifierpredictablefunctionfile systemvalidateisspinnerscommandgenericses2017flattenbyteirqstylesassertsautoscalingsetterastquerystringtoSortedES7eventsa11ystoragegatewayUint8ClampedArraychannelsloteslintpluginUint16ArrayfromhttpscsskinesisdirruntimeRxwatchFileinstallerconfigurableflatMapinterruptsspeedeszerobluebirdaccessibilitybyteLengthautoprefixersetPrototypeOfrapidassertiontrimEndlintIteratorflagsjestjoidiffWeakSetmodulefindLasteslintclonesidelinuxvestthroatmapeslintconfigdescriptorsgetPrototypeOfUint8Arrayi18nquotetriminspecttypedarrayclientjsECMAScript 2019upmiddlewareObject.valuescallboundtermcall-bindstringhasOwnconcatframeworkiecompareTypeBoxio-tsWebSocketsphonecolumnsHyBipostcss-pluginansiObjectcompilerflathas-ownCSSec2ESnextinvariantreadprotobufmetadataimmergetES2015classnamesReactiveExtensionsgroupInt16ArrayArray.prototype.findLastes6matchserializenested cssajvroute53_.extendfast-copyString.prototype.trimimmutablelockfilehelperstypedarraystakekarmaECMAScript 2022compile lesssigintES2021cryptocorsutilitiesdefineES3sharedarraybuffertypesglobArrayzodxhrequalitysymboles2018preserve-symlinksscheme-validationcliutilArray.prototype.containslessBigInt64ArraythrottlereplaytrimStartless.jsfunctionalregexpenvironmentoptimizerES5.envajaxratelimitcallbindnamemochaapicoercibleoncepackagesmacostslibparsermulti-packagereact-hook-formcallbackstylesheetnumberwalkeventDispatcherbddcss nestingfsfullwidthbootstrap lessES2016openECMAScript 5ES2017testingasyncelectronObject.keysresolveshamdescriptiondeterministicidshrinkwrapecmascriptjsonpathcryptisConcatSpreadablerestfulflagencryptionairbnbintrinsicURLrandomUint32Arrayequalenvironmentsawsvariables in csswatchingECMAScript 2018PromisermdirArrayBufferrangeerrorstyledeep-copyawesomesauceappECMAScript 2020elbimportexporttostringtagidlepostcssvalueWebSocketexitrfc4122util.inspectregextoStringTagjshintcollectionwrapnativereact-testing-librarypackagelookformatfast-deep-clonedayjsinputObject.fromEntriesextendqueryawait
1.0.0

22 days ago