astro-ghostcms/.pnpm-store/v3/files/f9/446db4af3ee08720de8791745aa...

30 lines
663 B
Plaintext
Raw Permalink Normal View History

2024-02-14 19:45:06 +00:00
'use strict';
var /** @type {ReturnType<import('.')>} */ possibleNames = [
'BigInt64Array',
'BigUint64Array',
'Float32Array',
'Float64Array',
'Int16Array',
'Int32Array',
'Int8Array',
'Uint16Array',
'Uint32Array',
'Uint8Array',
'Uint8ClampedArray'
];
var g = typeof globalThis === 'undefined' ? global : globalThis;
/** @type {import('.')} */
module.exports = function availableTypedArrays() {
var /** @type {ReturnType<typeof availableTypedArrays>} */ out = [];
for (var i = 0; i < possibleNames.length; i++) {
if (typeof g[possibleNames[i]] === 'function') {
// @ts-expect-error
out[out.length] = possibleNames[i];
}
}
return out;
};