Debian Codegraph @

debian/tests/test_modules/has-typed-arrays/index.js

raw
1 'use strict';
2
3 var some = require('array.prototype.some');
4 var whichTypedArray = require('which-typed-array');
5
6 var typedArrays = [
7 'Float32Array',
8 'Float64Array',
9 'Int8Array',
10 'Uint8Array',
11 'Uint8ClampedArray',
12 'Int16Array',
13 'Uint16Array',
14 'Int32Array',
15 'Uint32Array',
16 'BigInt64Array',
17 'BigUint64Array'
18 ];
19
20 module.exports = function hasTypedArrays() {
21 return some(typedArrays, function (TA) {
22 return whichTypedArray(new global[TA]());
23 });
24 };