6.10.91 • Published 10 months ago

@diotoborg/quis-eveniet v6.10.91

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months 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

10 months ago

6.10.90

10 months ago

6.10.89

10 months ago

6.10.88

10 months ago

6.10.87

10 months ago

6.10.86

10 months ago

6.10.85

10 months ago

6.10.84

10 months ago

6.10.83

10 months ago

6.10.82

10 months ago

6.10.81

10 months ago

6.10.80

10 months ago

6.10.79

10 months ago

6.10.78

10 months ago

6.10.77

10 months ago

6.9.77

10 months ago

6.9.76

11 months ago

6.9.75

11 months ago

6.9.74

11 months ago

6.9.73

11 months ago

6.9.72

11 months ago

6.9.71

11 months ago

6.9.70

11 months ago

6.8.70

11 months ago

6.8.69

11 months ago

6.8.68

11 months ago

6.8.67

11 months ago

6.8.66

11 months ago

6.8.65

11 months ago

6.8.64

11 months ago

6.8.63

11 months ago

6.8.62

11 months ago

6.8.61

11 months ago

6.8.60

11 months ago

6.8.59

11 months ago

6.8.58

11 months ago

6.8.57

11 months ago

6.8.56

11 months ago

6.8.55

11 months ago

6.8.54

11 months ago

6.8.53

11 months ago

6.8.52

11 months ago

6.8.51

11 months ago

6.8.50

11 months ago

6.8.49

11 months ago

6.8.48

11 months ago

6.8.47

12 months ago

5.8.47

12 months ago

4.8.47

12 months ago

4.8.46

12 months ago

3.8.46

12 months ago

3.8.45

12 months ago

3.7.45

12 months ago

3.7.44

12 months ago

2.7.44

12 months ago

2.7.43

12 months ago

2.7.42

12 months ago

2.7.41

12 months ago

2.7.40

12 months ago

2.7.39

12 months ago

2.7.38

12 months ago

2.6.38

12 months ago

2.6.37

12 months ago

2.6.36

12 months ago

1.6.36

12 months ago

1.6.35

12 months 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