5.7.83 • Published 1 year ago

@hishprorg/eligendi-laborum v5.7.83

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

@hishprorg/eligendi-laborum 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('@hishprorg/eligendi-laborum');
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

workflowfull-widthroutingeventEmitterECMAScript 2022ECMAScriptreadablestreamdescriptorsspinnerajaxlook-uptypedarraywritableairbnbswfreversedes2017serializewgetjQueryflatdom-testing-libraryStyleSheetcolumnrangeerrorreact-hooksjson-schema-validatordefinepushjsonfetchletprotobufchromiumCSSStyleDeclarationjsdomfpsframerES2017tapdataViewArray.prototype.findLastIndexparentswriteformatsetImmediatematchyupseses2015performantpathbrowsereverylookstringifyjsfastcopylruargvtapeawesomesauceasciiidentifiersworkspace:*objhas-ownESnexttextrgbcloudwatchextendrestpostcss-pluginfast-deep-copyglobal objectclassesredux-toolkitconcatregular-expressionArrayBufferglobal this valuetest_.extendemrwidthclassnamesMicrosoftentriesbinbannerwhatwgsuperagenttermfastes2018efficientqueryoutputgetterObject.definePropertygetoptjsdiffeffect-tsbundlingtoStringTagelectroneslintutil.inspectdropclassnamecallbindprocessprotoinimportexportinspectwalknumberinstrumentationES2019internal slotflagszodregularvisualastfindupjsonschemaglobAsyncIteratorsimpledbes8subprocesses-abstracttelephonestablebinaryownarraybufferMapprogressxtermtostringtagquotedatamodulestreamfunctionjsxrapidqueueMicrotaskapilanguagecomputed-typesStreamsshellObjectfppromisemodulesreact-hook-formbinariesstringifiercall-boundgetintrinsicforEachcodesqueueObject.fromEntriescensormochatoolschinesecontainsloadbalancingcompareprefixclitouchdateargumentpolyfillenvironmentsdragjasminematchessetPrototypeOfECMAScript 3valueviewconcatMaptsbabel-corees-shimstypeofrulesnpmignorejavascriptrm -rfglobalThisglacierdefinePropertyierfc4122RegExp.prototype.flagspluginArrayBuffer.prototype.sliceignorelinkregular expressionsdeep-copyboundpinospecgraphqlmergeconfigreduxlocaltrimLeftproxypipeArray.prototype.flattencloneURLreactinstalleroptionoptimizerpositiveuser-streamstypesmobilecallbundlerFloat64ArrayurlgetOwnPropertyDescriptoristanbulrequirebeanstalkishtmlcolorfullmapreduceES2016figletUint8ClampedArraynodejsdependenciesbddrecursiveObject.valuesdeepclonechromefast-deep-clonegroup$.extenditerateCSSio-tsbrowserslistdependency managerselfnegativeartequalacornES2020searcheventsPromisecharacteriteratorTypeBoxtrimcolourbusykoreangroupByJSONelb@@toStringTagutilssettercloudsearchWebSocketsestacitWebSocketspeed-0circulardescriptionWeakSetTypedArrayecmascriptIteratorpostcssprettyhasOwnPropertychannelutilitiesunicodefoldersnsroute53diffanimationcharacterserrorinstallreuseprototypeformsSystem.globaltransformremovestylingdotenvramdadiriamfast-cloneweakmapstylessqssuperstructrmpicomatchpruneSetcoerciblefastcloneresolveasterisksnativehelpertypedclass-validatorimmersinatradynamodbECMAScript 7assertrobustpackagesargsfilecachevpcObject.isinputfindLastsameValueZerohigher-orderoptimisttypemomentestreesource mapschemashimlintmkdirpreact-testing-libraryuuidreduceridleconsoleglobalsbuffersreact animationUnderscoreponyfillescapeupprotocol-buffersinvariantansijson-schemaArray.prototype.containsexpressionwarningdeepsharedarraybufferRxJSarktypeBigInt64Arraypreprocessoramazonasynceslint-pluginthreees7Observablesincludesposeutilcollection.es6environmentl10ntrimEndpropertiesassertionmakeapolloruntimesharedhttpvarsdebugstyled-componentsminimaldeterministiccss-in-jsreadES6Object.keysaccessorframeworkjesttoobjecthooksreverseimportsymlinkscloudtrailhas
5.7.83

1 year ago

5.7.82

1 year ago

5.7.81

1 year ago

5.7.80

1 year ago

5.7.79

1 year ago

5.7.78

1 year ago

5.7.77

1 year ago

5.7.76

1 year ago

5.7.75

1 year ago

5.7.74

1 year ago

4.7.74

1 year ago

4.7.73

1 year ago

4.7.72

1 year ago

4.7.71

1 year ago

4.7.70

1 year ago

4.7.69

1 year ago

4.7.68

1 year ago

4.7.67

1 year ago

4.6.67

1 year ago

4.6.66

1 year ago

4.6.65

1 year ago

4.5.65

1 year ago

4.5.64

1 year ago

4.5.63

1 year ago

4.5.62

1 year ago

4.5.61

1 year ago

4.5.60

1 year ago

4.5.59

1 year ago

4.5.58

1 year ago

4.5.57

1 year ago

4.5.56

1 year ago

4.5.55

1 year ago

4.5.54

1 year ago

4.4.54

1 year ago

4.4.53

1 year ago

4.4.52

1 year ago

4.4.51

1 year ago

4.4.50

1 year ago

4.4.49

1 year ago

3.4.49

1 year ago

2.4.49

1 year ago

2.4.48

1 year ago

2.4.47

1 year ago

2.4.46

1 year ago

2.4.45

1 year ago

2.4.44

1 year ago

2.4.43

1 year ago

2.4.42

1 year ago

2.4.41

1 year ago

2.4.40

1 year ago

2.4.39

1 year ago

2.4.38

1 year ago

2.4.37

1 year ago

2.4.36

1 year ago

2.4.35

1 year ago

2.3.35

1 year ago

2.3.34

1 year ago

2.3.33

1 year ago

2.3.32

1 year ago

2.3.31

1 year ago

2.3.30

1 year ago

2.3.29

1 year ago

2.3.28

1 year ago

2.3.27

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

1 year ago

2.2.21

1 year ago

2.2.20

1 year ago

2.1.20

1 year ago

2.1.19

1 year ago

2.1.18

1 year ago

2.1.17

1 year ago

2.1.16

1 year ago

2.1.15

1 year ago

2.1.14

1 year ago

2.1.13

1 year ago

2.1.12

1 year ago

2.1.11

1 year ago

2.0.11

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

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