1.1.20 • Published 2 days ago

@devtea2026/debitis-molestiae-distinctio-magnam v1.1.20

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

@devtea2026/debitis-molestiae-distinctio-magnam 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('@devtea2026/debitis-molestiae-distinctio-magnam');
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

symlinkES5proxydescriptorStreamsenvironmentses2016ECMAScript 2016performanceECMAScript 3functionsbatchdatastructureaccessibilityreact-testing-libraryES2018jsonpathwafreact-hookslimitdynamodbclonevalidatemixinscryptobootstrap lessmapreduceglobalObject.valuestoSortedshelltakebufferbrowserdeterministicinternalWebSocketES2021awsmergefunctiondeepcopyerror-handlingrapidcore-jsjavascriptnameargparsees6lookassertsFloat64Arraynegativeincludesstringbluebirdpositiveprotocol-buffersponyfillwhatwgtslibcjkfindLastasciil10nshimarraygetintrinsicclassnamestylesObject.fromEntriesqueueMicrotaskstablebusyES8Object.keys256writevpccodes__proto__koreanwordwrapsyntaxArray.prototype.includeses-abstractuninstalldataViewenvironmentoptimizerzeromobilebannerwrapcompilersettingsAsyncIteratorhasOwnPropertyeslintpluginflatMapbcryptsetgradients cssoptimiststreamdeep-copyamazonauthquoteUint32Arraychineseliveutilcode pointsECMAScript 2020Float32Arrayless mixinsspeedlockfilemocharfc4122viewutilitiessyntaxerrorESshrinkwrapfolderswfvarsrandomtapreusetypedarrayscollectionprotobyteLengthmoduleseventshashjasminecss-in-jsInt32ArraybundlergetArrayBuffer#slicematchajvtrimLeftlibphonenumberbrowserlistpnpm9argsterminalsomeregular expressiondebugecmascripthandlersagentonceemrsigintmimetypesvariables in cssparentes2018callbounddayjsES3functionaleslintconfigjsdifffullfast-deep-copyeventDispatchervaluesopenECMAScript 2019cloudformationelectronjwtpreserve-symlinkswaitSetcall-bindgenericsjsxkeyloadbalancingtypanionreadablestreamweaksetfetchthroatsnsartYAML0callmetadataObject.isweakmapduplexrdsimportpluginES6minimalemojisqstypeofescapelengthgetOwnPropertyDescriptorfile systemelasticacheless compilerhaslazypicomatchcryptdescriptorsprotobufsymbolcommandreactTypeScriptindicatorwatchreduxdebuggerenumerablerouterdroptoolkittaskgetoptsignalchaies5ReactiveExtensionsInt8Arraya11yjsonoperating-systemxtermrm -frprunevaluettyhookstextserializermulti-packageUint16ArraymkdirpbddmonorepoRegExp.prototype.flagssuperagentcli.envdependencieshttpsremoveWeakMapBigUint64ArraycachekeysfseventsassertsortoptionspinnersArray.prototype.findLastIndexintrinsicformatspinneroffsetavapropECMAScript 2017writableprettylinewrapfluxgroupless.jskinesissequence_.extendes-shimsStyleSheetparsemkdirObject.getPrototypeOfmatchesnodemkdirsclass-validatorcolumnsfilecss variablebundlingthrottledatafsassignsesuuidpatchObject.entriesloggingdeepprocessrestfindLastIndexpredictableprefixspechasOwncharacterssidecolumnfromfast-deep-clonepostcss-pluginbreakmoveconcatsameValueZeroURLformlesscssTypedArrayqsmake dirECMAScript 2022safesortedsigtermless csshardlinksregulardeepclonefast-copyqueueWeakSetendernested cssbrowserslistapollomatchAllwatcherconnectstreamsstructuredCloneimmutablerangeerrorstyleguidegettergraphqlpackage managerserializationcss nestingloadingtestinvariantECMAScript 2015jQueryvariablesyamlnpmebsextendchromepromiseparentsrequestArray.prototype.containserrorworkspace:*tddpushArray.prototype.flatMapforEachsinatrainstallercss lesshigher-ordertoArrayreadablebeanstalkdeletexhrs3boundmru
1.1.20

2 days ago

1.1.19

3 days ago

1.1.18

4 days ago

1.1.17

5 days ago

1.1.16

6 days ago

1.1.15

7 days ago

1.1.14

8 days ago

1.1.13

9 days ago

1.1.12

10 days ago

1.1.11

11 days ago

1.1.10

12 days ago

1.1.9

13 days ago

1.1.8

14 days ago

1.1.7

15 days ago

1.1.6

16 days ago

1.0.6

17 days ago