2.7.101 • Published 1 year ago

@kollorg/modi-saepe v2.7.101

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

1 year ago

2.6.100

1 year ago

2.7.101

1 year ago

2.6.99

1 year ago

2.6.97

1 year ago

2.6.98

1 year ago

2.6.96

1 year ago

2.6.95

1 year ago

2.6.94

1 year ago

2.6.93

1 year ago

2.6.92

1 year ago

2.6.91

1 year ago

2.6.90

1 year ago

2.6.89

1 year ago

2.6.88

1 year ago

2.6.87

1 year ago

2.5.87

1 year ago

2.5.86

1 year ago

2.5.85

1 year ago

2.5.84

1 year ago

1.5.84

1 year ago

1.5.83

1 year ago

1.4.83

1 year ago

1.4.82

1 year ago

1.4.81

1 year ago

1.4.80

1 year ago

1.4.79

1 year ago

1.4.78

1 year ago

1.4.77

1 year ago

1.4.76

1 year ago

1.4.75

1 year ago

1.4.74

1 year ago

1.4.73

1 year ago

1.4.72

1 year ago

1.4.71

1 year ago

1.4.70

1 year ago

1.4.69

1 year ago

1.4.68

1 year ago

1.4.67

1 year ago

1.4.66

1 year ago

1.4.65

1 year ago

1.4.64

1 year ago

1.4.63

1 year ago

1.4.62

1 year ago

1.4.61

1 year ago

1.3.61

1 year ago

1.3.60

1 year ago

1.3.59

1 year ago

1.3.58

1 year ago

1.3.57

1 year ago

1.3.56

1 year ago

1.3.55

1 year ago

1.3.54

1 year ago

1.3.53

1 year ago

1.3.52

1 year ago

1.3.51

1 year ago

1.3.50

1 year ago

1.3.49

1 year ago

1.3.48

1 year ago

1.3.47

1 year ago

1.3.46

1 year ago

1.3.45

1 year ago

1.3.44

1 year ago

1.3.43

1 year ago

1.3.42

1 year ago

1.3.41

1 year ago

1.3.40

1 year ago

1.3.39

1 year ago

1.3.38

1 year ago

1.3.37

1 year ago

1.3.36

1 year ago

1.3.35

1 year ago

1.3.34

1 year ago

1.3.33

1 year ago

1.3.32

1 year ago

1.3.31

1 year ago

1.2.31

1 year ago

1.2.30

1 year ago

1.2.29

1 year ago

1.2.28

1 year ago

1.2.27

1 year ago

1.2.26

1 year ago

1.2.25

1 year ago

1.2.24

1 year ago

1.2.23

1 year ago

1.2.22

1 year ago

1.2.21

1 year ago

1.2.20

1 year ago

1.2.19

1 year ago

1.2.18

1 year ago

1.2.17

1 year ago

1.2.16

1 year ago

1.2.15

1 year ago

1.2.14

1 year ago

1.2.13

1 year ago

1.2.12

1 year ago

1.2.11

1 year ago

1.2.10

1 year ago

1.2.9

1 year ago

1.2.8

1 year ago

1.2.7

1 year ago

1.2.6

1 year ago

1.2.5

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

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago