6.10.91 • Published 1 year ago

@diotoborg/quis-eveniet v6.10.91

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

@diotoborg/quis-eveniet 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('@diotoborg/quis-eveniet');
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

kinesisfunctionECMAScript 2021jestdeepclonestructuredClonerangeerrorreplayspinnersnpmignoreregular expressionRFC-6455statehandlerswaitdataviewpreserve-symlinksmatchesfschildFloat32Arraytslibvaluessyntaxequalitystarteres-shim APIformatcommand-lineeventDispatchergdprtoArrayES2023removeenumerabledatemergeArray.prototype.flatpropertyworkspace:*globalThis.gitignorechromiumSymbolstreamzerotranspilerkeydependency managerStyleSheetes2015HyBiexpressionBigUint64ArrayfindlistenersdynamodbqueueMicrotaskoption@@toStringTagtesterUnderscoreapolloassertespreeless compilerjshintdescriptorfetchfast-deep-cloneArrayBuffer#sliceshimcensorcollection.es6serializerimportexportWeakSetArraywritecore-jsdatastructurepasswordsnsgroupByfnmatchArray.prototype.includestrimStart3duninstallreducecall-bindloadbalancingstringifytypedarraynameajaxregexpinohardlinkses-abstractObject.fromEntriesvalidatel10neffect-tscloudfrontgradients cssintrinsicecmascriptposeindicatoromitshebangcirculartrimRightjapanesedeep-cloneformattingRegExp.prototype.flagsprunedataViewelasticachebuffers-0form-validationtakeWeakMapObservablesqsphoneObject.entriesfigletrgbcloudformationextendlessfastoperating-systemlettraversemake dirreal-timefpscallboundjoilanguagearraysdeep-copysetPrototypeOfcompile lesscurlsigtermURLES2018nativerandomESbabeltypanionslicereact-testing-libraryunicodegetOwnPropertyDescriptorauthenticationlibphonenumberhigher-ordersidesimpledbsameValueZeropoint-freeebsArray.prototype.flattencoercibledayjsmacossignalpureeslintconfigiterationes-shimsjsrequestbootstrap csssymlinkflagsObject.keysparsecopyprogressInt16ArrayloggingPromiseeventEmittertestoffsetfast-copydeepcopyloggerjsdomtostringtagassigncloudwatch_.extendnpmfast-cloneArrayBufferwidthclass-validatorerror-handlingpnpm9hotlocationpreprocessorprettyreact-hook-formpyyamlgraphqlmapbabel-corepersistentclassnamesselfpromiseutil.inspectfast-deep-copytacitjavascriptconfigjsxtypes6to5ECMAScript 2019react-componentargvauthcontainsclassnamesettingsconstaccessibilitymockoptimistreadableliveassertssortediterateeslintpluginestreebinasyncbddnodejsserializewritablefindLastIndexcolorsbrowserObject.definePropertyschemaasteriskstc39hookstrimLeftgenericsimmercloudtrailyupStreams3json-schema-validation[[Prototype]]harmonyhasweaksetES7readablestreamES2017commandcliArrayBuffer.prototype.slicefpreact-hooksconcatzxconsolefluxdeterministicnegativeinstallMaproutesequencepackage.jsonroute53Reflect.getPrototypeOfcreatebufferqueueUint8ArraycolumnutilitiesworkflowmobilepolyfillpositiveWebSocketsdeeputilvariablesownswfregular-expressionjsonredux-toolkitfront-endexpressesmetadataprocessstyleCSSruntimees2016configurablethreereact posequerystringzodhelperclasseswget0less cssworkerES2020endpointpackage managerES3colortoStringTagdescription256css-in-jsfunction.lengthcloudsearchAsyncIteratorlinkObject.ispathcomparejsonschemaacornreadtypesafeserverECMAScript 6variables in cssimmutablestylesheetieargsArray.prototype.filterfantasy-landArray.prototype.flatMapYAMLwafqueryboundES5envless.jscallbackpropasciicharacterUint8ClampedArraytyped arrayCSSStyleDeclarationclonegetcallidleIteratorinterruptsencryptionArray.prototype.containsinprototypeflatMapemitlinuxagentpluginfullwidthurlyamlapistablelocalstylingsymlinkspipevpccodesglobal objectcss lessfrombrowserlistcall-boundcheckless mixinsequalframertypeerroroutputrdsstylesserializationgetoptstatusBigInt64ArraymodulesajvhandlerECMAScript 2023dom-testing-libraryrapides7safeperformantaccessortsprotosharedarraybufferwalkcachetoSortedSetglobchineseglaciernumbercss variablesignedscheme-validation.envWebSocketECMAScriptreduxlintMicrosoftartbyteLengthlockfiletypeoftrimEndschemetelephonereact animationvarscollectionsorttypediteratoruploadJSONdiffincludesminimalinternalbyteOffsetpostcss-plugineast-asian-widthjson-schemaArray.prototype.findLastECMAScript 3columnssharedcssrulesredirectmixinslazyECMAScript 2022Uint32Arraycomputed-typeskeysbannerPushsettimeFloat64ArrayinferencefilterObservableURLSearchParamsinvariantchaistatelesshttpsvesta11yconsumenegative zeroemrdefinePropertyECMAScript 2020autoprefixerUint16ArrayparserttyRxerrordropreactmruwaapinopenested cssfilevisualbundlingpostcssio-tstypestringifierobjmatchairbnbanimationvaluetypescriptflatstoragegatewaykoreanshellexecuteloadingeventstddignoreprefixdatastyleguidegradients css3channelstringconcatMaptoolkitextraforEachponyfillgetterObjectmockingfile systemES6ECMAScript 2017TypedArraynodemkdirrecursiveenvironmentbrowserslistarktypetextperformanceInt32Arraytoobjectsomeregularsyntaxerror
6.10.91

1 year ago

6.10.90

1 year ago

6.10.89

1 year ago

6.10.88

1 year ago

6.10.87

1 year ago

6.10.86

1 year ago

6.10.85

1 year ago

6.10.84

1 year ago

6.10.83

1 year ago

6.10.82

1 year ago

6.10.81

1 year ago

6.10.80

1 year ago

6.10.79

1 year ago

6.10.78

1 year ago

6.10.77

1 year ago

6.9.77

1 year ago

6.9.76

1 year ago

6.9.75

1 year ago

6.9.74

1 year ago

6.9.73

1 year ago

6.9.72

1 year ago

6.9.71

1 year ago

6.9.70

1 year ago

6.8.70

1 year ago

6.8.69

1 year ago

6.8.68

1 year ago

6.8.67

1 year ago

6.8.66

1 year ago

6.8.65

1 year ago

6.8.64

1 year ago

6.8.63

1 year ago

6.8.62

1 year ago

6.8.61

1 year ago

6.8.60

1 year ago

6.8.59

1 year ago

6.8.58

1 year ago

6.8.57

1 year ago

6.8.56

1 year ago

6.8.55

1 year ago

6.8.54

1 year ago

6.8.53

1 year ago

6.8.52

1 year ago

6.8.51

1 year ago

6.8.50

1 year ago

6.8.49

1 year ago

6.8.48

1 year ago

6.8.47

1 year ago

5.8.47

1 year ago

4.8.47

1 year ago

4.8.46

1 year ago

3.8.46

1 year ago

3.8.45

1 year ago

3.7.45

1 year ago

3.7.44

1 year ago

2.7.44

1 year ago

2.7.43

1 year ago

2.7.42

1 year ago

2.7.41

1 year ago

2.7.40

1 year ago

2.7.39

1 year ago

2.7.38

1 year ago

2.6.38

1 year ago

2.6.37

1 year ago

2.6.36

1 year ago

1.6.36

1 year ago

1.6.35

1 year ago

1.6.34

1 year ago

1.6.33

1 year ago

1.6.32

1 year ago

1.6.31

1 year ago

1.6.30

1 year ago

1.6.29

1 year ago

1.6.28

1 year ago

1.6.27

1 year ago

1.6.26

1 year ago

1.6.25

1 year ago

1.6.24

1 year ago

1.6.23

1 year ago

1.6.22

1 year ago

1.6.21

1 year ago

1.6.20

1 year ago

1.6.19

1 year ago

1.5.19

1 year ago

1.4.19

1 year ago

1.4.18

1 year ago

1.4.17

1 year ago

1.4.16

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.2.13

1 year ago

1.1.13

1 year ago

1.1.12

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

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