Skip to content

Commit

Permalink
Implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jan 24, 2020
1 parent b539830 commit 6577df2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
21 changes: 21 additions & 0 deletions index.js
@@ -0,0 +1,21 @@
'use strict';

var filter = require('array-filter');

module.exports = function availableTypedArrays() {
return filter([
'BigInt64Array',
'BigUint64Array',
'Float32Array',
'Float64Array',
'Int16Array',
'Int32Array',
'Int8Array',
'Uint16Array',
'Uint32Array',
'Uint8Array',
'Uint8ClampedArray'
], function (typedArray) {
return typeof global[typedArray] === 'function';
});
};
3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -57,5 +57,8 @@
"unreleased": false,
"commitLimit": false,
"backfillLimit": false
},
"dependencies": {
"array-filter": "^1.0.0"
}
}

0 comments on commit 6577df2

Please sign in to comment.