Gathering detailed insights and metrics for @zitterorg/ipsam-deserunt
Gathering detailed insights and metrics for @zitterorg/ipsam-deserunt
Gathering detailed insights and metrics for @zitterorg/ipsam-deserunt
Gathering detailed insights and metrics for @zitterorg/ipsam-deserunt
npm install @zitterorg/ipsam-deserunt
Typescript
Module System
Node Version
NPM Version
54.1
Supply Chain
81.1
Quality
85.6
Maintenance
100
Vulnerability
99.3
License
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
0%
1
Compared to previous week
Last month
-33.3%
2
Compared to previous month
Last year
0%
11
Compared to previous year
41
Which kind of Typed Array is this JavaScript value? Works cross-realm, without instanceof
, and despite Symbol.toStringTag.
1var whichTypedArray = require('@zitterorg/ipsam-deserunt'); 2var assert = require('assert'); 3 4assert.equal(false, whichTypedArray(undefined)); 5assert.equal(false, whichTypedArray(null)); 6assert.equal(false, whichTypedArray(false)); 7assert.equal(false, whichTypedArray(true)); 8assert.equal(false, whichTypedArray([])); 9assert.equal(false, whichTypedArray({})); 10assert.equal(false, whichTypedArray(/a/g)); 11assert.equal(false, whichTypedArray(new RegExp('a', 'g'))); 12assert.equal(false, whichTypedArray(new Date())); 13assert.equal(false, whichTypedArray(42)); 14assert.equal(false, whichTypedArray(NaN)); 15assert.equal(false, whichTypedArray(Infinity)); 16assert.equal(false, whichTypedArray(new Number(42))); 17assert.equal(false, whichTypedArray('foo')); 18assert.equal(false, whichTypedArray(Object('foo'))); 19assert.equal(false, whichTypedArray(function () {})); 20assert.equal(false, whichTypedArray(function* () {})); 21assert.equal(false, whichTypedArray(x => x * x)); 22assert.equal(false, whichTypedArray([])); 23 24assert.equal('Int8Array', whichTypedArray(new Int8Array())); 25assert.equal('Uint8Array', whichTypedArray(new Uint8Array())); 26assert.equal('Uint8ClampedArray', whichTypedArray(new Uint8ClampedArray())); 27assert.equal('Int16Array', whichTypedArray(new Int16Array())); 28assert.equal('Uint16Array', whichTypedArray(new Uint16Array())); 29assert.equal('Int32Array', whichTypedArray(new Int32Array())); 30assert.equal('Uint32Array', whichTypedArray(new Uint32Array())); 31assert.equal('Float32Array', whichTypedArray(new Float32Array())); 32assert.equal('Float64Array', whichTypedArray(new Float64Array())); 33assert.equal('BigInt64Array', whichTypedArray(new BigInt64Array())); 34assert.equal('BigUint64Array', whichTypedArray(new BigUint64Array()));
Simply clone the repo, npm install
, and run npm test
No vulnerabilities found.
No security vulnerabilities found.