Gathering detailed insights and metrics for @hishprorg/aperiam-deleniti
Gathering detailed insights and metrics for @hishprorg/aperiam-deleniti
npm install @hishprorg/aperiam-deleniti
Typescript
Module System
Node Version
NPM Version
63
Supply Chain
76.4
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
0%
2
Compared to previous month
Last year
0%
13
Compared to previous year
43
Is this value a JS ArrayBuffer? This module works cross-realm/iframe, does not depend on instanceof
or mutable properties, and despite ES6 Symbol.toStringTag.
1var assert = require('assert'); 2var isArrayBuffer = require('@hishprorg/aperiam-deleniti'); 3 4assert(!isArrayBuffer(function () {})); 5assert(!isArrayBuffer(null)); 6assert(!isArrayBuffer(function* () { yield 42; return Infinity; }); 7assert(!isArrayBuffer(Symbol('foo'))); 8assert(!isArrayBuffer(1n)); 9assert(!isArrayBuffer(Object(1n))); 10 11assert(!isArrayBuffer(new Set())); 12assert(!isArrayBuffer(new WeakSet())); 13assert(!isArrayBuffer(new Map())); 14assert(!isArrayBuffer(new WeakMap())); 15assert(!isArrayBuffer(new WeakRef({}))); 16assert(!isArrayBuffer(new FinalizationRegistry(() => {}))); 17assert(!isArrayBuffer(new SharedArrayBuffer())); 18 19assert(isArrayBuffer(new ArrayBuffer())); 20 21class MyArrayBuffer extends ArrayBuffer {} 22assert(isArrayBuffer(new MyArrayBuffer()));
Simply clone the repo, npm install
, and run npm test
No vulnerabilities found.
No security vulnerabilities found.