main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
475 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | var possibleNames = require('possible-typed-array-names');
|
---|
4 |
|
---|
5 | var g = typeof globalThis === 'undefined' ? global : globalThis;
|
---|
6 |
|
---|
7 | /** @type {import('.')} */
|
---|
8 | module.exports = function availableTypedArrays() {
|
---|
9 | var /** @type {ReturnType<typeof availableTypedArrays>} */ out = [];
|
---|
10 | for (var i = 0; i < possibleNames.length; i++) {
|
---|
11 | if (typeof g[possibleNames[i]] === 'function') {
|
---|
12 | // @ts-expect-error
|
---|
13 | out[out.length] = possibleNames[i];
|
---|
14 | }
|
---|
15 | }
|
---|
16 | return out;
|
---|
17 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.