2.0.16 • Published 1 year ago

@dramaorg/tempora-numquam v2.0.16

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

@dramaorg/tempora-numquam Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Which kind of Typed Array is this JavaScript value? Works cross-realm, without instanceof, and despite Symbol.toStringTag.

Example

var whichTypedArray = require('@dramaorg/tempora-numquam');
var assert = require('assert');

assert.equal(false, whichTypedArray(undefined));
assert.equal(false, whichTypedArray(null));
assert.equal(false, whichTypedArray(false));
assert.equal(false, whichTypedArray(true));
assert.equal(false, whichTypedArray([]));
assert.equal(false, whichTypedArray({}));
assert.equal(false, whichTypedArray(/a/g));
assert.equal(false, whichTypedArray(new RegExp('a', 'g')));
assert.equal(false, whichTypedArray(new Date()));
assert.equal(false, whichTypedArray(42));
assert.equal(false, whichTypedArray(NaN));
assert.equal(false, whichTypedArray(Infinity));
assert.equal(false, whichTypedArray(new Number(42)));
assert.equal(false, whichTypedArray('foo'));
assert.equal(false, whichTypedArray(Object('foo')));
assert.equal(false, whichTypedArray(function () {}));
assert.equal(false, whichTypedArray(function* () {}));
assert.equal(false, whichTypedArray(x => x * x));
assert.equal(false, whichTypedArray([]));

assert.equal('Int8Array', whichTypedArray(new Int8Array()));
assert.equal('Uint8Array', whichTypedArray(new Uint8Array()));
assert.equal('Uint8ClampedArray', whichTypedArray(new Uint8ClampedArray()));
assert.equal('Int16Array', whichTypedArray(new Int16Array()));
assert.equal('Uint16Array', whichTypedArray(new Uint16Array()));
assert.equal('Int32Array', whichTypedArray(new Int32Array()));
assert.equal('Uint32Array', whichTypedArray(new Uint32Array()));
assert.equal('Float32Array', whichTypedArray(new Float32Array()));
assert.equal('Float64Array', whichTypedArray(new Float64Array()));
assert.equal('BigInt64Array', whichTypedArray(new BigInt64Array()));
assert.equal('BigUint64Array', whichTypedArray(new BigUint64Array()));

Tests

Simply clone the repo, npm install, and run npm test

cloudwatchmovees2015streamweaksetdescriptorslooktypedarrayspinnerslook-up[[Prototype]]internalWebSocketstreamsYAMLES2022kinesiscurlbufferlengthindicatorqueryPromiseRxJSflagserializationfullwidthbrowserslistdirectoryMicrosoftimmernopecloudsearchArrayBuffer.prototype.slicerecursiveisConcatSpreadableArray.prototype.flattenapiclassnamemkdirppluginsafecolorslotefficientxtermrobustflagscore-jspostcsslocalenvironmentstapetslibsqsremoveenvshimpureargumentmatchWeakSetArray.prototype.filtersliceidlenegativeeslintpluginnumbercollection.es6privateES2023propequalitypackagesframermatchesajvtoSortedio-tsparseacornasynchasquotelintonceES7Object.definePropertyesfast-copyarraybufferprogresswaitsetterdataviewrgbrequestclassestyped arrayformatredirectvalidationlocationrapidworkflowunicodegetinESnextdescriptionlinkargvpropertyES5SetsnsECMAScripttypesafetypeofconfigtimetoobjectramdainspectincludesinstrumentationlibphonenumberenumerableparentsargsES2021assertfeedFloat32Arrayreworktransportistanbulselffixed-widthInt16Arrayeslintconfigconstes8uninstallTypeBoxavaparentdependency managermochautilitiescacheArray.prototype.flatMapfunctionalzerotakees2016trimStartruntimenodexhrprunetostringtagsuperstructpatchoptionbyteECMAScript 20216to5mergevalidatetypeerrorjsdiffjsonhasOwnPropertysomearrayutilielastcall-boundwritecallbindexpressionvariablesfnmatchECMAScript 2017sameValueZeroglaciermatchAllbrowserlistloggingdirworkspace:*fullCSSStyleDeclarationtestingatomgitignoreclientdataViewreverseArray.prototype.includesroute53fromvarsWeakMapassignboundreadableescapepreprocessorschemauptraversestoragegatewaygetintrinsictoolsmruansies2017installerwidthECMAScript 2019toStringTagECMAScript 2022syntaxerroroutputreact-testing-libraryfastifyspawnvaliddropArray.prototype.findLastdynamodbrssfsgetPrototypeOfelectronformscollectionelbURLyupttyfetchasciimobilereduxvisualpathfull-widthconcatMapimmutablepipearraysiteratenegative zerotranspileString.prototype.matchAllsimpledbcolumnwalkcensorInt32ArrayreadablestreamPushfindLastIndexObject.keysenderdeep-clonepropertiesi18nloadingECMAScript 5deletefilterinstallSystem.globalsymlinkszodtypescriptregular expressionsbrowserprotodebugRegExp#flagsperformancereact animationdeepTypedArrayzxartfile systemregular expressionclonerestnpmreducercommanderRxuuidmetadatasetPrototypeOfhigher-orderUint8ClampedArrayhookformhttpqueueMicrotasksource mapreact-hookspinoes-abstractawesomesaucenodejstoolkitpyyamlbindextraeventDispatcherentrieswarningignorereal-timewhichlogjavascriptgesturesresolveloggerCSS256callboundrestfulfindupuser-streamsmonorepowebUint32Arraycloudfrontespreetranspilersymbolsreversedfunction.lengthkeyscoreconsumeArrayBuffer#slicepushaccessibilityjson-schema-validatorformtransformbundlererrorcallbacksortjsxglobalsregexemitarktype3dcloudtrailcodesinferenceReactiveExtensionshashswfArrayBuffermapObjectemojifigletcloudformationclass-validatorreadassertionchinesejson-schema-validationgetOwnPropertyDescriptorFunction.prototype.namepackageECMAScript 2016environmentArrayES2018astES8namereact poseshellstablesortedchaitrimconfigurablevestdefineBigInt64Arrayfast-clonechromewindowkoreansideworkermakeidglobalparserAsyncIteratorprettymodulesyntaxtddArray.prototype.flatglobal objectReactiveXhelperstermcliassertsrm -frprocesssubprocessECMAScript 2020@@toStringTageslint-pluginfindsuperagentcoerciblespinnereventEmitterconsolevalues3stringifysharedarraybuffertc39childbusycharacterObservablesflatMapdayjsexeccommandstylebddWebSocketsqsairbnbcolumns0jQueryjshintcommand-linemodulesES2017rangeerrormulti-packageguiddatespringjson-schemaposethreevarrm -rftrimLeftcode pointscomputed-typesfiletoReversedframeworkemrdeterministicphoneloadbalancingvalidatorgdprArray.prototype.containswhatwgbyteOffsetrdsstringifier.gitignorewritableclassnamesrmdirjssymboleffect-tsviewStreamglobalThisJSONpromisedeep-copycss-in-jsdependenciesfind-upSymbol.toStringTagpackage.jsonoptimisttapidentifierstypedarrayskeytrimEndsearchUint8Arrayutilsautoscalingsesstylingruleseslintdatabinariesasterisksrouting-0requireurlcircularprefixjestcharacters.envebsendpointanimationObject.valueswafRFC-6455buffersvpcdebuggerlockfileinvariantreactECMAScript 6listenerscoveragedom-testing-librarycopyInt8ArrayinputstructuredCloneextendObject.istestelasticachebannerspecregexpprotobufbundlingschemeHyBiforkstringmapreduceregular-expressionFloat64ArrayBigUint64Arraytextnativefastcloneutilitybabelfunctionsflattendescriptoreast-asian-widthforEachtacitfastshamwalkingquerystringserializees5execfilefastcopymkdirsjapanesepackage managerfast-deep-cloneec2StreamsshebangdiffequalES2019ES2015RegExp.prototype.flagsfindLastESoffsetObject.fromEntrieschromiumfoldergroupBystyleguideiteratorpoint-freemanipulationapplanguageiscurriedjsdomIteratorJSON-Schemaownredactqueueflatfantasy-landES3Object.getPrototypeOfredux-toolkittelephonescheme-validationhtmltsECMAScript 2015letdragnamesreuseSymbola11ywaapicolorstypedeepcopycompilerharmonykarmahttpsmake dirhas-owneventstoArrayObject.assignArray.prototype.findLastIndexgetteragentgetopt
2.0.16

1 year ago

2.0.15

1 year ago

2.0.14

1 year ago

2.0.13

1 year ago

2.0.12

1 year ago

2.0.11

1 year ago

2.0.10

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago