2.0.10 • Published 4 days ago

@hishprorg/quia-aspernatur-quae v2.0.10

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

@hishprorg/quia-aspernatur-quae 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('@hishprorg/quia-aspernatur-quae');
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

__proto__east-asian-widthredirectxmleventEmitterroutefast-copyprototypeinternalrobustflatkeyweakmapHyBiWeakMapzoddragextendtypanionexecutableUint32Arraycommand-linesearchgetexeECMAScript 2015importexportECMAScript 6typedarraysamazonfast-clonearktypeinstallRegExp.prototype.flagsconcurrencyapollokeyshttpslooktimesyntaxpopmotionruntimeawsi18nsetES2016queryshebangfull-widthtypefixed-widthdirectorybufferespreecommandermruglacierworkspace:*getoptexpressES2015readableESbuffersgetintrinsicajvrecursivees2018hardlinksjsdomeslint-pluginfindLastfast-deep-clonefindqueueMicrotaskinputfind-upoptionfile systemES2023react-hooksArray.prototype.flattenjshintReactiveXtypedarrayglobenvObject.fromEntriesupSettypeofsuperagentmakepreprocessorchinesecharacterisConcatSpreadablegetOwnPropertyDescriptordatastructureJSONArrayBuffer#sliceObservableremovecode pointsrfc4122ECMAScript 2020reactparserdescriptionwordwrapgdprvpcmkdirpconcatlimitedguidestreedefinedom-testing-librarycomparedeepcopyWeakSetfpscreateUnderscorefoldertapSymbol.toStringTagdescriptorajaxfastifyastECMAScript 2017codesbyteLengthmobileurlargumentswhichasynctrimLeftpostcss-plugincjkeditorpackage.jsonvestperformancedependency managerdefinePropertyzxPushuuidpruneratelimitsymlinkurlsdebuggerdomECMAScript 2016spinnerdirArray.prototype.findLastIndexendpointjavascripttransformargvpropertycryptofeedstringECMAScript 2023function.lengthpreserve-symlinksvisualtoobjectownUint8ArrayefficientexpressionhelperhttpchannelhookformclientjestdropagentsettingslastextensionReflect.getPrototypeOfURLmovedateassertionpromisesboundtrimStartES2020websitermvarsbinariesprefixvalidationrm -frec2globalsharedarraybufferrequirewalkingbinaryes-abstractsetImmediatetsvalidatedeterministiclockfileutil.inspectmodulesArray.prototype.includessimpledbkarmainferencelintObject.assignobjtoolkitcloudformationnodestartObject.definePropertyfindupsuperstructIteratorArrayBufferlibphonenumberenvironmentES2018momentclass-validatorpipeqstexttoStringTagvaluextermformsflaglocationdiffhasOwnvalidcommandstoragegatewaycore-jslaunchmodulecomputed-typeses-shimsebseslintlimitpushutilityserializerES5rssparentsatomcircularcallboundStyleSheetrandomgesturesobjectfullwidthObject.keysautoprefixergenericsidleloggingconsumeObject.isformerrorartStream_.extendenvironmentstostringtagimmutableflatMapInt32Array@@toStringTagentriesiterationstylebindtypednumberfindLastIndextypesafeviewcolourindicatorrequestURLSearchParamsfigletwaapipropertiesdeepclonestyleguide-0regular expressioncallcoercibleFloat32ArrayttyTypeBoxsafesortES6browsersliststyleses-shim APIgraphql-clientsource mappluginstreams2argsmatchAllArrayBuffer.prototype.slicehooksemrreact posesyntaxerrormapgroupgetterwgetlanguagecloudfrontes2015charactersaccessorES3call-boundnameCSSStyleDeclarationtypeerrorESnextstdlibtypesdataViewfast-deep-copyworkflowObservablesutiltslibequalitydayjsminimalintrinsicunicoderegularopenerswfdeep-cloneFunction.prototype.namesetPrototypeOfbeanstalktaskECMAScript 2022everyworkerregular expressionses6apiimportexecute$.extendposepackage managerlistenersiterateECMAScript 2021ArrayCSSECMAScript 7touchredux-toolkitrm -rflook-upappaccessibilitywalkforkparsees20160execfilereact-testing-libraryObject.getPrototypeOfpersistentdataviewchromegraphqlterminalcloudwatchassertoffsetserializeframerphonebusyweaksetclonebrowsertoSortedopenwritenameswrapanimationarraysymlinksrdsroutingeventses8processspawnregexpES2021callbindpatchwordbreaktoolsPromisehaspositivequeuefunctionshashawaitrmdirprettytypescriptFloat64Arrayreducecallbackreact-hook-formbytetddsequenceES7arraysshimduplexcloudtrailstreamspolyfillcensorexecmime-dbsomefunctionArray.prototype.findLastwarningMicrosoftnegative zeronopeprotobufloglinkstringifygetPrototypeOfchaioptimizers3reduxJSON-SchemasymbolietapeoutputeslintconfigdeletexdgforEachrangeerrordescriptorseslintpluginreusekoreanstablestylingextracolornpmgroupByroute53columntelephoneinspectECMAScript 5traverseresolveescapeString.prototype.trimBigUint64ArraynativeMapjasmineflattenSymbolincludesmime256whatwgconsolefastcopyECMAScript 2019datacall-binddefaultes7formattingInt8ArrayArray.prototype.containspyyamlsharedomitchromiumsameValueZeronodejsObject.entriesprivatemimetypesassignES2019quotehigher-ordersubprocesssidecacheStreamshtmlassertsmetadataarraybufferprogressES8RxJSInt16Arraylazyidentifierssetterparsingl10npicomatchponyfillreducermanipulationmkdirbluebirdreal-timemkdirsawesomesaucetestingwritableasciiECMAScript 3fromspringcssjsdiffoptimist.envRFC-6455packagesiambyteOffsetairbnbstatelesslinewrappathbundlingtermthreematchidpackagetrimRightchildshamredactcorejsxio-tsUint8ClampedArrayutilitiescheckvaluesinternal slotfiltersqsES2022Array.prototype.filtercolorswafRxemitbreakfasttranspilerreworkbddslotbrowserlistconfigurableelasticachefullArray.prototype.flatinstallerloadingtrimEndsnskinesises2017WebSocketsortedlocalpostcssrapiddeeprgbtoArrayspeedquerystringspecmergepnpm9yamlfetchUint16Arrayslicetestbannertc39matchesES2017Objectschemadotenvjoiavacliequaldeep-copyvariablesmonorepomulti-packageeventDispatcherYAMLspinnersjsecmascriptfsnegativeperformantcmdcollectionwaitmake dir[[Prototype]]symbolsString.prototype.matchAlltyped arrayformatmapreducecss-in-jscolumnsthroatrateflags
2.0.10

4 days ago

2.0.7

7 days ago

2.0.6

8 days ago

2.0.9

5 days ago

2.0.8

6 days ago

1.0.6

9 days ago

1.0.5

10 days ago

1.0.4

11 days ago

1.0.3

12 days ago

1.0.2

13 days ago

1.0.1

14 days ago

1.0.0

14 days ago