3.5.104 • Published 10 months ago

@patrtorg/tenetur-labore v3.5.104

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

@patrtorg/tenetur-labore 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('@patrtorg/tenetur-labore');
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

plugin@@toStringTagMapIteratorsigtermdomjsObservablewaapidefineexpressionreact posecloudwatchxtermglobalsjapaneseclient[[Prototype]]es7Uint32Arraycollection.es6proxyjshintopenssltoArrayamazonfantasy-landpruneprotosetreuseUint8Arrays3ES8tsprivatecopydeepsymlinkfast-deep-copyslicees8symbolsfunctiondataviewES2015toStringTagreadablebootstrap lesstypescriptcloneairbnbSystem.globalrandomcompareformtostringtaglibphonenumbersequencecolourconsolespawnInt8ArraytypeofprefixwindowsbundlerTypedArrayschemeconcatECMAScript 2018rgbObject.assignstyleguideasciispecfindnegative zeroArray.prototype.findLastincensordataes6jwtspeedrequirevalidhasisdependenciesfluxinstallmoduletestObject.definePropertygradients css3negativefindLastIndexpushauthenticationsuperagentpoint-freemockes-abstractregexArray.prototype.flatMapgetoptnamesstableES2023offsetback-endansirdsautoscalingless csssyntaxfpsmkdirStreamObjecttrimLeftjestidentifiersservergesturesfunctionschannelpersistentfiltertrimRighttypanionisConcatSpreadableObject.isvalidatorutilitysortedless compilerprivate datacompilercallmacosi18ntakeObservablesCSSStyleDeclarationreact animationweaksetmatchAllfpstringifyvpcstatusjson-schemaWeakSetrequestbinariesFloat64ArraySymboltraversenopeECMAScript 2023dropmake dirpackagesjsonschemaspinnersclass-validatorInt32ArrayhashsharedvestWebSocketscomputed-typesargseslintconfiges5terminalirqassertiontacitcachetranspilerbdddefinePropertyanimationbabel-corepromiseglobalThisarrayscss variableinspectshellebsjQuerycloudsearchReactiveXjsonweakmapBigInt64Arrayglobthreepostcss-pluginchaicall-boundworkspace:*loadbalancingmruemitdirectoryECMAScript 3fast-clonequotehandlersgroupByquerycss nestingasyncbundlingshamenvdescriptionsignednativehookschromeencryptionaccessorfast-copydatetoobjecthelpersasteriskscurltestingTypeBoxsymlinksbinddirquerystringserializationECMAScript 5babelES2019listenersgenericsinvariantbootstrap cssmobilegetOwnPropertyDescriptorcodesstartereventslesscssentriespositivecss-in-jsnumberstreamstddbyteOffsetserviceWebSocketES5binaryponyfillECMAScript 2020telephoneacornrangeerrorRFC-6455ArrayBufferarraybufferio-tsgetintrinsicarktypewidthflagsdescriptorscloudformationfromlinthasOwnexecfilebyteLengthsetPrototypeOf$.extendttysnsdayjsinputoptimistlinktrimStartdeletemakewhatwgredirecterror-handlingstatelessclihardlinksPushStyleSheetprotobufexpresscommandArray.prototype.flatten_.extendtyped arrayfunctionalECMAScript 2015columnscreateremoveJSON-Schemaurlcompile lesstransportparserloggerserializelinuxprettyforEachefficientcollectionjsxtranspileawsroutingchineseSymbol.toStringTagcore-jsWeakMapcloudfrontcallbindRxJSES6immerchildsqspackage managera11ysubprocessECMAScript 2017ES2017configurableUint16Arraytypedarraytesterregular-expressionECMAScript 2019preserve-symlinkselbnpmimportexportphonelogreact-hookscallboundtypeJSONspinnerobjmomentrecursiveECMAScript 6less.jsreadablestreamObject.entriesoperating-systemvaluesspringloggingaccessibilitytimees-shim APImonoreposelfparsenested cssreadprogressconfigsigintreact-componentqueueruntimecryptoequalityajaxfront-endlastelectronunicodedragURLSearchParamsflagbrowserslistassertcolorRegExp.prototype.flagsdescriptorstyled-componentsinternal slotqueueMicrotaskES7argvworkflowfastclonecloudtrailregexptrimEndglobal this valuewalkjson-schema-validationelasticachehttpsAsyncIteratorsharedarraybuffercryptenvironmentsshrinkwrapieqsformatl10nmapreduceECMAScript 2022joiloadingwriteextrahttpagentES2022keyswhichmkdirsramdautilsimpledbconsumeArrayBuffer.prototype.sliceignorePromiseclassnamesintrinsices2017beanstalkArrayBuffer#slicefile systemdynamodbString.prototype.trimsettingsArray.prototype.filterviewgetscheme-validationframercircularBigUint64ArrayRxinferencepackage.jsonespreeapieffect-tsestreecolumncertificatesHyBioutputes-shims.enveventDispatcherstreamtoolsCSSidlehasOwnPropertyextendless mixinsfast-deep-cloneoption
2.5.103

10 months ago

3.5.103

10 months ago

3.5.104

10 months ago

2.5.102

10 months ago

2.5.101

10 months ago

2.5.100

10 months ago

2.5.99

10 months ago

2.5.98

10 months ago

2.5.97

10 months ago

2.5.96

10 months ago

2.5.95

10 months ago

2.5.94

10 months ago

2.5.93

10 months ago

2.5.92

10 months ago

2.5.91

10 months ago

2.5.90

10 months ago

2.5.89

10 months ago

2.5.88

10 months ago

2.5.87

10 months ago

2.5.86

10 months ago

2.5.85

10 months ago

2.5.84

11 months ago

2.5.83

11 months ago

2.5.82

11 months ago

2.5.81

11 months ago

2.5.80

11 months ago

2.5.79

11 months ago

2.5.78

11 months ago

2.4.78

11 months ago

2.4.77

11 months ago

2.3.77

11 months ago

2.3.76

11 months ago

2.3.75

11 months ago

2.3.74

11 months ago

2.3.73

11 months ago

2.3.72

11 months ago

2.3.71

11 months ago

2.3.70

11 months ago

2.3.69

11 months ago

2.3.68

11 months ago

2.3.67

11 months ago

2.3.66

11 months ago

2.3.65

11 months ago

2.3.64

11 months ago

2.3.63

11 months ago

2.3.62

11 months ago

2.3.61

11 months ago

2.3.60

11 months ago

2.2.60

11 months ago

2.2.59

11 months ago

2.2.58

11 months ago

2.1.58

12 months ago

2.1.57

12 months ago

2.1.56

12 months ago

2.1.55

12 months ago

2.1.54

12 months ago

2.1.53

12 months ago

2.1.52

12 months ago

2.1.51

12 months ago

2.1.50

12 months ago

2.1.49

12 months ago

2.1.48

12 months ago

2.1.47

12 months ago

2.1.46

12 months ago

2.1.45

12 months ago

2.1.44

12 months ago

2.1.43

12 months ago

2.1.42

12 months ago

2.1.41

12 months ago

2.1.40

12 months ago

2.1.39

12 months ago

2.1.38

1 year ago

2.1.37

1 year ago

2.1.36

1 year ago

2.1.35

1 year ago

2.1.34

1 year ago

1.1.34

1 year ago

1.1.33

1 year ago

1.1.32

1 year ago

1.1.31

1 year ago

1.1.30

1 year ago

1.1.29

1 year ago

1.1.28

1 year ago

1.1.27

1 year ago

1.1.26

1 year ago

1.1.25

1 year ago

1.1.24

1 year ago

1.1.23

1 year ago

1.1.22

1 year ago

1.1.21

1 year ago

1.1.20

1 year ago

1.1.19

1 year ago

1.1.18

1 year ago

1.1.17

1 year ago

1.1.16

1 year ago

1.1.15

1 year ago

1.1.14

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

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago