4.10.112 • Published 1 year ago

@diotoborg/adipisci-soluta v4.10.112

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

@diotoborg/adipisci-soluta 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/adipisci-soluta');
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

Uint8ClampedArrayreduxlockfileformsStreamfullwidthFloat32Arrayprivate datasidemove_.extendeveryoptimistmkdirsargumentcharactercomputed-typescacheutilitiesframeworkfilejsdomflatidlereact-testing-libraryTypeScriptURLSearchParamsregular expressionsymboleslintconfigES7webregexStyleSheetbinddeletepostcssuninstalles2016formaturlSymbol.toStringTagreact-hook-formObject.iselectroncloudwatchObservablecodesObject.getPrototypeOfsubprocesshelpersreduce-0objectESsetImmediatesharedarraybufferequalityhelperuuidnegativewindowfindupisconfigurablejestphoneprivateECMAScript 2017ArrayBuffer#sliceprotodiffyamlansiglobalsnumberspawnRegExp.prototype.flagsECMAScript 5kinesisramdanamestypeerrorqsstringifymochainternal slottransformprettyArray.prototype.findLastIndexgroupBycloudfrontcore-jsenvironmentcolorexpressionregexpfunctioncreatesettypedarrayses-shimsimmercjknpmAsyncIteratorresttextnativeIteratorfixed-widthisConcatSpreadablees7ES5configairbnbtranspileECMAScript 2022reuseasteriskschromiumwriteprefixstringifierpnpm9sinatralastinstallercolumnsmake dirworkerreversetrimRightfpslistenersappvariablesfolderspinnersbddeventseslint-pluginshelldescriptioncompilererrorWeakMapReflect.getPrototypeOfstyled-componentsvalidateclasseszerormUnderscorepromisesetterYAMLArray.prototype.flates2017structuredClonecloudtrailredacthigher-ordercontainsjapaneseECMAScript 6Array.prototype.filtertrimLeftCSSapistreamsshimvisualtypeofrouteserializationelasticachewritableperformantstreamreactresolvespinner256bannercryptomanagerdefinePropertyfile systemdeepclonehookstypeObject.fromEntriesvestreal-timeloggersimpledbreact-hooksECMAScript 7languagejQueryrgbkarmaES2023sortlengthrangeerrorObject.assignawesomesauceupfigletECMAScript 2019RxArray.prototype.includesJSON-Schemaelbpoint-freelook-upsyntaxbinaryinference
4.10.111

1 year ago

4.10.112

1 year ago

4.10.109

1 year ago

4.10.110

1 year ago

4.10.108

1 year ago

4.10.107

1 year ago

4.10.106

1 year ago

4.10.105

1 year ago

4.10.104

1 year ago

3.10.104

1 year ago

3.10.103

1 year ago

3.9.103

1 year ago

3.9.102

1 year ago

3.9.101

1 year ago

3.9.100

1 year ago

3.9.99

1 year ago

3.9.98

1 year ago

2.9.98

1 year ago

2.9.97

2 years ago

2.9.96

2 years ago

2.9.95

2 years ago

2.9.94

2 years ago

2.9.93

2 years ago

2.8.93

2 years ago

2.8.92

2 years ago

2.8.91

2 years ago

2.8.90

2 years ago

2.8.89

2 years ago

2.8.88

2 years ago

2.8.87

2 years ago

2.8.86

2 years ago

2.7.86

2 years ago

2.6.86

2 years ago

2.6.85

2 years ago

2.6.84

2 years ago

2.6.83

2 years ago

2.6.82

2 years ago

2.6.81

2 years ago

2.6.80

2 years ago

2.5.80

2 years ago

1.5.80

2 years ago

1.5.79

2 years ago

1.5.78

2 years ago

1.5.77

2 years ago

1.5.76

2 years ago

1.5.75

2 years ago

1.5.74

2 years ago

1.5.73

2 years ago

1.5.72

2 years ago

1.5.71

2 years ago

1.5.70

2 years ago

1.5.69

2 years ago

1.5.68

2 years ago

1.5.67

2 years ago

1.5.66

2 years ago

1.5.65

2 years ago

1.5.64

2 years ago

1.5.63

2 years ago

1.4.63

2 years ago

1.4.62

2 years ago

1.4.61

2 years ago

1.4.60

2 years ago

1.4.59

2 years ago

1.4.58

2 years ago

1.4.57

2 years ago

1.4.56

2 years ago

1.3.56

2 years ago

1.3.55

2 years ago

1.3.54

2 years ago

1.3.53

2 years ago

1.3.52

2 years ago

1.3.51

2 years ago

1.3.50

2 years ago

1.3.49

2 years ago

1.3.48

2 years ago

1.2.48

2 years ago

1.2.47

2 years ago

1.2.46

2 years ago

1.2.45

2 years ago

1.2.44

2 years ago

1.2.43

2 years ago

1.2.42

2 years ago

1.2.41

2 years ago

1.2.40

2 years ago

1.2.39

2 years ago

1.2.38

2 years ago

1.2.37

2 years ago

1.2.36

2 years ago

1.2.35

2 years ago

1.2.34

2 years ago

1.2.33

2 years ago

1.2.32

2 years ago

1.2.31

2 years ago

1.2.30

2 years ago

1.2.29

2 years ago

1.2.28

2 years ago

1.2.27

2 years ago

1.2.26

2 years ago

1.2.25

2 years ago

1.2.24

2 years ago

1.2.23

2 years ago

1.1.23

2 years ago

1.1.22

2 years ago

1.1.21

2 years ago

1.1.20

2 years ago

1.1.19

2 years ago

1.1.18

2 years ago

1.1.17

2 years ago

1.1.16

2 years ago

1.1.15

2 years ago

1.1.14

2 years ago

1.1.13

2 years ago

1.1.12

2 years ago

1.1.11

2 years ago

1.1.10

2 years ago

1.1.9

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago