1.0.0 • Published 1 year ago

@micromint1npm/in-fugit-nesciunt v1.0.0

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

@micromint1npm/in-fugit-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('@micromint1npm/in-fugit-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

packagesuperstructstablelogiteratortoSortedObject.fromEntriesl10ncodeswatchingqueryECMAScript 2022Object.valuesES3typeofECMAScript 2017parserhigher-orderwebeslintpluginhotbannerargparsemoverecursive.envtrimflagjsdomoptimizerObject.assignvariables in csswatchiterationairbnbgenericspostcss-pluginmatchESwafinternal slotECMAScript 7internalespreeregularshamArray.prototype.findLastoutputpackage.jsonhashloadbalancingredux-toolkitfullsearchendervariablesproxyimportexportES6ES2019columnsfetchremovenopebufferUint8ClampedArrayfluxgetoptfast-copystarterscheme-validationargstaskstylesheetcallbacklinktextbusyisfseventsformattingfslistenersfind-upamazonwritableiamcontainsmixinslinewraputilmruredactcssspinnerinhooksfinduptoolstelephoneidlecloudtrailfunctionsextendCSSmkdirStreamsimmutablefpses5symlinkTypedArrayArrayBuffer#slicesuperagentsyntaxencryptionES2020configgradients cssUnderscorecollection.es6rdsmapreducestyled-componentsreadmonorepoinputcharactercode pointsSymbol.toStringTages-shimsObservablevaliddeletetaptoolkitpropertyreduceECMAScript 2018widthObject.definePropertyreal-timejsonintrinsicframeworkcomputed-typesdayjsawesomesauce-0circularcloudsearchmatchesStreamquerystringdependency managertrimEndbindstyleECMAScript 6autoscalingES2015beanstalkkeysbuffersfromartIteratorhas-ownthrottlehasOwndebugreadablestreamgetPrototypeOfruntimecloudwatchnegative zerormdirlocationes7japaneseincludescharactersgradients css3sliceoptimistphonesymlinksspecnativeArray.prototype.flatMapdataViewwhatwgtest[[Prototype]]ECMAScript 5onceassertsslotargumentES2021enumerablesharedroutingbundlingcolorsschemeECMAScript 2016fastclonethroatcollectiongetintrinsicCSSStyleDeclarationless mixinspatchmiddlewarecompile lessflatcommandsettereveryextensionesrgbconcattapePromisecorestateconsoleexpressionfilecliboundsequencecolumnmergeSetconcatMapmime-dbfindLastavaString.prototype.trimtc39s3stdlibESnextnumberObject.keyswaitcjkUint32ArraytermES2017pushebsutilityWeakSetfunctionaljwtargveventEmitterrequestweaksetlook-upUint16ArrayauthenticationString.prototype.matchAllcopydefinePropertymimetypesdependenciesi18nutil.inspectspeedURL256wraptoStringTages-shim APIequalprivatewriteefficientECMAScript 2020installerpropertiescommanderasciiio-tsFloat64ArrayObject.issimpledbcolorawsrandomArraybcryptObject.entriesES7extrapreserve-symlinksbrowserslistajves-abstractfixed-widthRxJSgetES2023streamsvaluescheckcall-boundECMAScript 2021zerotestingflatMaprapidflattenzodelectronpredictableterminalflagstraversesnsparentpersistentshebangmatchAllprogressviewstreams2route53map@@toStringTagyupfullwidthieECMAScript 2015expresshttppicomatchjskeyInt8Arrayless.jsform-validationsharedarraybufferelasticacheworkernpmobjdatequeuekoreancss nestingdeepcopycompareansitypedarraysendpointECMAScript 2019chaiaccessibilityresolvenested csselbec2ECMAScript 3importgdprlockfilelibphonenumberprotoes2016css lesskinesisswfarktypeunicodeelmJSON-SchemaUint8ArrayYAMLPushglobsidetrimLeftWebSocketsRegExp#flagsauthhttpsparsecryptoArray.prototype.includesdatastructureawaitloggernegativeregular expressionenvMicrosoftajaxgraphqlredirectvaluepromisewgetclass-validatorassertmake direcmascriptapiarrayperformancedeepmkdirseventDispatcherbrowseraccessorfull-width$.extendcallinstallbundleres2018consumeparsinggroupByschemajsonpathtschineseeslintconfigsortedestreedynamodbtimeloggingfastArray.prototype.findLastIndexcolourmulti-packageArray.prototype.filterwalkingjQuerytypeerrorduplexRFC-6455private dataHyBicallboundvalidatelesscsslazyprotocol-bufferswhichliveObject.getPrototypeOfes2017lessreact-testing-libraryguidrateexecES5minimalassertionidrobusta11ypackagesfast-clonelrunodejsstyleguidejavascriptdropmodulereactinspectsqsdeepclonecore-jspostcssES2018react-hooksstoragegatewaystringifyhasOwnPropertysetImmediateweakmap_.extendroutecoercibleregexes8shrinkwrapiteratewatchFilenamesshelljasmineentriestakeArrayBuffer.prototype.slicextermdataviewreadabledeterministicnodebytedefineapollotrimStartwatchermochamakeasyncdirqueueMicrotaskinvariantstringfigletdeep-copycensorcss-in-jsomitutilitiesdiffECMAScript 2023ttyBigUint64Arrayconfigurablefile systemconnectArrayBuffermodulespathTypeScripttslibtoArraychromeless cssclonefast-deep-copyES8RegExp.prototype.flagspropmetadataeast-asian-widthpasswordcall-bindprototypeES2016stylingdescriptorcorsrequirevpcreact-hook-formlimitAsyncIteratorReactiveExtensionsbddES2022filterlanguageparentsregexphardlinkslooksymbolrmgetOwnPropertyDescriptorsomeassignowninferencebatchastwalkregular expressionsopenpreprocessorclassesqsArray.prototype.flattenFunction.prototype.namearraysarraybuffertypedglacier
1.0.0

1 year ago