2.7.101 • Published 4 months ago

@kollorg/modi-saepe v2.7.101

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

@kollorg/modi-saepe 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('@kollorg/modi-saepe');
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

columnsObject.isprivateArrayBufferECMAScript 2017streamstoragegatewaystarterierestjestclonecommandsinatrareact animationgetoptenumerableArrayBuffer.prototype.slice-0RFC-6455cssdeep-clone6to5jsdomECMAScript 5parentdeep-copybddrestfuleverymovedataviewvarsramdajavascripttypeswebartCSScolumnsearchdayjsmanipulationcachecloudformationarktypesetPrototypeOfformsFloat64ArraypipewalkparentsbuffersObject.fromEntrieschannelreversereadbrowserslistpushboundnodejsinvariantasserttapexecfilexhrmockwarningextracall-boundponyfilliamreduxArray.prototype.flatlookisConcatSpreadabledefineresolveanimationprototypefast-clone0configeslintfeedObject.valuesreact-hooksstringifierfilterentriesflagistanbulcopyvarworkspace:*ansisharedarraybufferfile systemviewstructuredClonestyleschaipolyfillminimaldotenvgetcall-bindajvcallbindunicodevisualzeroes-abstractobjectlastredirectes6joitrimRightrequestcharactersgetintrinsicwaapiqsdependency managertrimStartfetchfast-deep-clonerecursivesyntaxfunction.lengthbindhtmlawesomesaucenpmtypedarraystypeofUint16Arrayscheme-validationbrowserlistURLSearchParamsmoduleselectroneventsestreestringthreeuser-streamscloudwatchserializerregularflattypedarrayfoldermatcheschildhas-ownbyteOffsetwhatwgcoverageescapeconsumeReactiveXCSSStyleDeclarationbufferReactiveExtensionspatchprettymochaeffect-tscjkbinariesurlassertses2017optionfindLastIndexsettingsregexomit3dutilitydependencies@@toStringTagharmonydataViewwritehardlinkstypescriptESprocesshelperscallboundsource mapttytslibenvironmentformStreamvalidationbinhooksyamlinstallerpostcss-plugincomputed-typesbusymockingl10nswfpluginsymbolmerge
2.6.101

4 months ago

2.6.100

4 months ago

2.7.101

4 months ago

2.6.99

4 months ago

2.6.97

4 months ago

2.6.98

4 months ago

2.6.96

4 months ago

2.6.95

4 months ago

2.6.94

5 months ago

2.6.93

5 months ago

2.6.92

5 months ago

2.6.91

5 months ago

2.6.90

5 months ago

2.6.89

5 months ago

2.6.88

5 months ago

2.6.87

5 months ago

2.5.87

5 months ago

2.5.86

5 months ago

2.5.85

5 months ago

2.5.84

5 months ago

1.5.84

5 months ago

1.5.83

5 months ago

1.4.83

5 months ago

1.4.82

5 months ago

1.4.81

5 months ago

1.4.80

5 months ago

1.4.79

5 months ago

1.4.78

5 months ago

1.4.77

5 months ago

1.4.76

5 months ago

1.4.75

5 months ago

1.4.74

5 months ago

1.4.73

5 months ago

1.4.72

5 months ago

1.4.71

5 months ago

1.4.70

5 months ago

1.4.69

5 months ago

1.4.68

5 months ago

1.4.67

6 months ago

1.4.66

6 months ago

1.4.65

6 months ago

1.4.64

6 months ago

1.4.63

6 months ago

1.4.62

6 months ago

1.4.61

6 months ago

1.3.61

6 months ago

1.3.60

6 months ago

1.3.59

6 months ago

1.3.58

6 months ago

1.3.57

6 months ago

1.3.56

6 months ago

1.3.55

6 months ago

1.3.54

6 months ago

1.3.53

6 months ago

1.3.52

6 months ago

1.3.51

6 months ago

1.3.50

6 months ago

1.3.49

6 months ago

1.3.48

6 months ago

1.3.47

6 months ago

1.3.46

6 months ago

1.3.45

6 months ago

1.3.44

6 months ago

1.3.43

6 months ago

1.3.42

6 months ago

1.3.41

6 months ago

1.3.40

6 months ago

1.3.39

6 months ago

1.3.38

7 months ago

1.3.37

7 months ago

1.3.36

7 months ago

1.3.35

7 months ago

1.3.34

7 months ago

1.3.33

7 months ago

1.3.32

7 months ago

1.3.31

7 months ago

1.2.31

7 months ago

1.2.30

7 months ago

1.2.29

7 months ago

1.2.28

7 months ago

1.2.27

7 months ago

1.2.26

7 months ago

1.2.25

7 months ago

1.2.24

7 months ago

1.2.23

7 months ago

1.2.22

7 months ago

1.2.21

7 months ago

1.2.20

7 months ago

1.2.19

7 months ago

1.2.18

7 months ago

1.2.17

7 months ago

1.2.16

7 months ago

1.2.15

7 months ago

1.2.14

7 months ago

1.2.13

7 months ago

1.2.12

7 months ago

1.2.11

7 months ago

1.2.10

7 months ago

1.2.9

8 months ago

1.2.8

8 months ago

1.2.7

8 months ago

1.2.6

8 months ago

1.2.5

8 months ago

1.1.5

8 months ago

1.1.4

8 months ago

1.1.3

8 months ago

1.1.2

8 months ago

1.1.1

8 months ago

1.1.0

8 months ago

1.0.0

8 months ago