Gathering detailed insights and metrics for is-typed-array
Gathering detailed insights and metrics for is-typed-array
Gathering detailed insights and metrics for is-typed-array
Gathering detailed insights and metrics for is-typed-array
Is this value a JS Typed Array? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag.
npm install is-typed-array
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
12 Stars
144 Commits
7 Forks
5 Watching
2 Branches
3 Contributors
Updated on 17 Aug 2024
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-5.4%
6,622,494
Compared to previous day
Last week
2.2%
38,277,168
Compared to previous week
Last month
7%
159,798,589
Compared to previous month
Last year
47.4%
1,683,818,636
Compared to previous year
1
24
[![dependency status][5]][6] [![dev dependency status][7]][8]
Is this value a JS Typed Array? This module works cross-realm/iframe, does not depend on instanceof
or mutable properties, and despite ES6 Symbol.toStringTag.
1var isTypedArray = require('is-typed-array');
2var assert = require('assert');
3
4assert.equal(false, isTypedArray(undefined));
5assert.equal(false, isTypedArray(null));
6assert.equal(false, isTypedArray(false));
7assert.equal(false, isTypedArray(true));
8assert.equal(false, isTypedArray([]));
9assert.equal(false, isTypedArray({}));
10assert.equal(false, isTypedArray(/a/g));
11assert.equal(false, isTypedArray(new RegExp('a', 'g')));
12assert.equal(false, isTypedArray(new Date()));
13assert.equal(false, isTypedArray(42));
14assert.equal(false, isTypedArray(NaN));
15assert.equal(false, isTypedArray(Infinity));
16assert.equal(false, isTypedArray(new Number(42)));
17assert.equal(false, isTypedArray('foo'));
18assert.equal(false, isTypedArray(Object('foo')));
19assert.equal(false, isTypedArray(function () {}));
20assert.equal(false, isTypedArray(function* () {}));
21assert.equal(false, isTypedArray(x => x * x));
22assert.equal(false, isTypedArray([]));
23
24assert.ok(isTypedArray(new Int8Array()));
25assert.ok(isTypedArray(new Uint8Array()));
26assert.ok(isTypedArray(new Uint8ClampedArray()));
27assert.ok(isTypedArray(new Int16Array()));
28assert.ok(isTypedArray(new Uint16Array()));
29assert.ok(isTypedArray(new Int32Array()));
30assert.ok(isTypedArray(new Uint32Array()));
31assert.ok(isTypedArray(new Float32Array()));
32assert.ok(isTypedArray(new Float64Array()));
33assert.ok(isTypedArray(new BigInt64Array()));
34assert.ok(isTypedArray(new BigUint64Array()));
Simply clone the repo, npm install
, and run npm test
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no SAST tool detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More