1 | # available-typed-arrays <sup>[![Version Badge][2]][1]</sup>
|
---|
2 |
|
---|
3 | [![github actions][actions-image]][actions-url]
|
---|
4 | [![coverage][codecov-image]][codecov-url]
|
---|
5 | [![dependency status][5]][6]
|
---|
6 | [![dev dependency status][7]][8]
|
---|
7 | [![License][license-image]][license-url]
|
---|
8 | [![Downloads][downloads-image]][downloads-url]
|
---|
9 |
|
---|
10 | [![npm badge][11]][1]
|
---|
11 |
|
---|
12 | Returns an array of Typed Array names that are available in the current environment.
|
---|
13 |
|
---|
14 | ## Example
|
---|
15 |
|
---|
16 | ```js
|
---|
17 | var availableTypedArrays = require('available-typed-arrays');
|
---|
18 | var assert = require('assert');
|
---|
19 |
|
---|
20 | assert.deepStrictEqual(
|
---|
21 | availableTypedArrays().sort(),
|
---|
22 | [
|
---|
23 | 'Int8Array',
|
---|
24 | 'Uint8Array',
|
---|
25 | 'Uint8ClampedArray',
|
---|
26 | 'Int16Array',
|
---|
27 | 'Uint16Array',
|
---|
28 | 'Int32Array',
|
---|
29 | 'Uint32Array',
|
---|
30 | 'Float32Array',
|
---|
31 | 'Float64Array',
|
---|
32 | 'BigInt64Array',
|
---|
33 | 'BigUint64Array'
|
---|
34 | ].sort()
|
---|
35 | );
|
---|
36 | ```
|
---|
37 |
|
---|
38 | ## Tests
|
---|
39 | Simply clone the repo, `npm install`, and run `npm test`
|
---|
40 |
|
---|
41 | [1]: https://npmjs.org/package/available-typed-arrays
|
---|
42 | [2]: https://versionbadg.es/inspect-js/available-typed-arrays.svg
|
---|
43 | [5]: https://david-dm.org/inspect-js/available-typed-arrays.svg
|
---|
44 | [6]: https://david-dm.org/inspect-js/available-typed-arrays
|
---|
45 | [7]: https://david-dm.org/inspect-js/available-typed-arrays/dev-status.svg
|
---|
46 | [8]: https://david-dm.org/inspect-js/available-typed-arrays#info=devDependencies
|
---|
47 | [11]: https://nodei.co/npm/available-typed-arrays.png?downloads=true&stars=true
|
---|
48 | [license-image]: https://img.shields.io/npm/l/available-typed-arrays.svg
|
---|
49 | [license-url]: LICENSE
|
---|
50 | [downloads-image]: https://img.shields.io/npm/dm/available-typed-arrays.svg
|
---|
51 | [downloads-url]: https://npm-stat.com/charts.html?package=available-typed-arrays
|
---|
52 | [codecov-image]: https://codecov.io/gh/inspect-js/available-typed-arrays/branch/main/graphs/badge.svg
|
---|
53 | [codecov-url]: https://app.codecov.io/gh/inspect-js/available-typed-arrays/
|
---|
54 | [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/available-typed-arrays
|
---|
55 | [actions-url]: https://github.com/inspect-js/available-typed-arrays/actions
|
---|