28 lines
519 B
Plaintext
28 lines
519 B
Plaintext
|
'use strict';
|
||
|
|
||
|
var possibleNames = [
|
||
|
'BigInt64Array',
|
||
|
'BigUint64Array',
|
||
|
'Float32Array',
|
||
|
'Float64Array',
|
||
|
'Int16Array',
|
||
|
'Int32Array',
|
||
|
'Int8Array',
|
||
|
'Uint16Array',
|
||
|
'Uint32Array',
|
||
|
'Uint8Array',
|
||
|
'Uint8ClampedArray'
|
||
|
];
|
||
|
|
||
|
var g = typeof globalThis === 'undefined' ? global : globalThis;
|
||
|
|
||
|
module.exports = function availableTypedArrays() {
|
||
|
var out = [];
|
||
|
for (var i = 0; i < possibleNames.length; i++) {
|
||
|
if (typeof g[possibleNames[i]] === 'function') {
|
||
|
out[out.length] = possibleNames[i];
|
||
|
}
|
||
|
}
|
||
|
return out;
|
||
|
};
|