5.10.94 • Published 10 months ago

@erboladaiorg/nihil-natus v5.10.94

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@erboladaiorg/nihil-natus 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('@erboladaiorg/nihil-natus');
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

react-hookspinoemitrangeerrorbundlerprivate dataescapeECMAScript 2015gdpriambinaryutilsArrayBuffer#slicepicomatchquotestoragegatewayredactwafloadbalancingstylingmergeUint8ClampedArrayECMAScriptsymbolspureES8TypedArraydeepcopyfunctionpruneoptioncharacterstacitmulti-packagedeepclientelectrontrimEndmomentserializerforEachjspopmotionstringifyconsumecontainsdebuggerjsonschematoobjectparsestringifierio-tswarninginstrumentationamazonasterisksgetintrinsiccode pointsconcatharmonyglobal this valuereducertouchl10nproxyutil.inspectsyntaxerrortc39typedfantasy-landreadbyteES5requiresortcore-jsdatereduceObject.getPrototypeOfyupdircall-bindtoArrayramdabinslotdataviewRxJSexpressfastifyfileelasticachecomputed-typeses5argumentURLSearchParamsArrayBufferboundjsonwhichprototypequerystringindicatorpackageprefixnamesReactiveExtensionsclass-validatoreventEmitterremovemkdirutilhashtoSortedcloudfrontlinkjson-schema-validatorObject.ispropertiesECMAScript 7cssfindsameValueZerobindsharedhasObject.valuestypanionconstJSON-Schemapromisees6globalThisRegExp#flagsexpressiones-shims$.extendviewidentifiersaccessibilityentriesspeednegative zerotelephoneObservablesatomStreamsUint8Arraypoint-freeECMAScript 5emojijsxcallboundcommanderexecspinnerreversestarternodeexecutemonorepocreategetPrototypeOfCSSownqspackage managerjestWeakSetlocationgraphqlendpointdescriptorsregexfindLastmanipulationdirectoryefficientassertsxmllogansinpmdeepcloneTypeBox6to5Array.prototype.flatMapreadablestreamponyfillargsinstallprotofastcopyobjfastglobal objectcloudsearchnamebabel-coresuperstructterminalshimfast-cloneSymbolArray.prototype.containsgroupECMAScript 2019ttytesterajvArray.prototype.flattsstablehttpsoptimistes7tapfind-uprapidjsdiffmobilelintastInt32Arraytypeskoreandescriptorimmer.envshebangfetchStreamuser-streamswindowcallbindeast-asian-widthinstallerjoicloudformationtypedarraybyteLengthpropertytypesafefunctionsECMAScript 2017UnderscoreecmascriptECMAScript 2021symlinkssidereact posecjkstyleassertes2017hookformvarrestfulbundlingArray.prototype.findLastIndexsqsdynamodbequalityarraybufferxtermes-shim APIasyncappserializeieletsomehasOwnPropertylocalpackage.jsonbuffersloggerdiffwaittakeeveryunicodevisualchromereact animationreversedSetreact-testing-libraryparentES2016isConcatSpreadablephoneintrinsicreduxcryptotermcollection.es6HyBiinputjavascript-0styleguidetoStringTagqueuexhrmapreducetypedarraysassignec2workflowfsjshintshrinkwrapforksharedarraybuffereslintconfigautoprefixerRFC-6455uninstallextraroute53ArrayPromisequeueMicrotaskworkspace:*RxECMAScript 3ECMAScript 2022es2016guidcloudwatchdayjsarktypeestreeanimationES2021recursivecompilermrutrimStartcolourObject.assignoutputES3kinesisvariablesplugintranspilerinvarianttestingqueryObservableformrobust_.extendeslintpluginpipeavawgetclassnamesbrowserslistYAMLArray.prototype.filterfullES2019asciiidmanagerpolyfillglacierwebperformancepostcss-pluginjson-schemasyntaxbufferparentsswfes2018call-boundsafedependency managerpnpm9serializationBigUint64Arrayfast-deep-copysinatrafastcloneFloat32ArrayvalidatorES2022trimLeftwritenumberbeanstalkreact-hook-formcoveragespinnersSymbol.toStringTagfnmatchcircularprocesstypescriptignorecurlcensorminimalregular expressionchilda11ycommand-lineistanbulgetrmdirhtmlurlfunctionalpostcssrandomsortedsymbolArray.prototype.flattentextexecfilemkdirpwritabledata0positiveString.prototype.trimhooksroutingchannelreactcloudtrailtoolkitcollectionextendhelperawesomesauceeffect-tsnopeschemafast-deep-clonecopyredux-toolkites8flagObject.keysoptimizerfigletES2020i18ngitignorehigher-ordercurriedIteratorglobdescriptiontslibreal-timeobjectairbnbrulesspringdependenciesassertionimportgenericsrsselbfolderES6accessorfixed-widthpreprocessorrdsreadableinternal slotECMAScript 2018routerconsolefindLastIndexbinariessettingsmatchfeedbabeltyped arraykeysstreamvarsmetadataautoscalinghelperstypeofchineseInt16ArrayequalhttphasOwnoncemake dirtransportglobalString.prototype.matchAlltypeerrorUint16Arrayformatting
5.10.94

10 months ago

5.10.93

10 months ago

5.9.93

10 months ago

5.9.92

10 months ago

5.9.91

10 months ago

5.9.90

11 months ago

5.9.89

11 months ago

5.9.88

11 months ago

5.9.87

11 months ago

5.9.86

11 months ago

5.9.85

11 months ago

5.9.84

11 months ago

5.9.83

11 months ago

5.9.82

11 months ago

5.9.81

11 months ago

5.9.80

11 months ago

5.9.79

11 months ago

5.9.78

11 months ago

5.9.77

11 months ago

5.9.76

11 months ago

5.9.75

11 months ago

5.9.74

11 months ago

5.9.73

11 months ago

5.9.72

11 months ago

5.8.72

11 months ago

5.8.71

11 months ago

5.8.70

11 months ago

5.8.69

11 months ago

5.8.68

11 months ago

5.8.67

11 months ago

5.7.67

11 months ago

5.7.66

11 months ago

5.7.65

11 months ago

5.7.64

11 months ago

5.7.63

11 months ago

5.7.62

12 months ago

4.7.62

12 months ago

4.6.62

12 months ago

4.6.61

12 months ago

4.6.60

12 months ago

4.6.59

12 months ago

4.6.58

12 months ago

4.6.57

12 months ago

4.6.56

12 months ago

4.6.55

12 months ago

4.6.54

12 months ago

3.6.54

12 months ago

3.6.53

12 months ago

3.6.52

12 months ago

3.5.52

12 months ago

3.5.51

12 months ago

3.5.50

12 months ago

3.5.49

12 months ago

3.5.48

12 months ago

3.5.47

12 months ago

3.5.46

1 year ago

3.5.45

1 year ago

3.5.44

1 year ago

3.5.43

1 year ago

3.5.42

1 year ago

3.4.42

1 year ago

3.4.41

1 year ago

3.4.40

1 year ago

3.3.40

1 year ago

3.3.39

1 year ago

3.3.38

1 year ago

3.3.37

1 year ago

3.3.36

1 year ago

3.3.35

1 year ago

3.3.34

1 year ago

3.3.33

1 year ago

3.3.32

1 year ago

3.3.31

1 year ago

3.3.30

1 year ago

3.3.29

1 year ago

3.3.28

1 year ago

3.3.27

1 year ago

3.3.26

1 year ago

2.3.26

1 year ago

2.3.25

1 year ago

2.3.24

1 year ago

2.3.23

1 year ago

2.3.22

1 year ago

2.3.21

1 year ago

2.3.20

1 year ago

2.3.19

1 year ago

2.3.18

1 year ago

1.3.18

1 year ago

1.3.17

1 year ago

1.3.16

1 year ago

1.3.15

1 year ago

1.3.14

1 year ago

1.3.13

1 year ago

1.3.12

1 year ago

1.3.11

1 year ago

1.3.10

1 year ago

1.3.9

1 year ago

1.3.8

1 year ago

1.3.7

1 year ago

1.3.6

1 year ago

1.3.5

1 year ago

1.3.4

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago