https://github.com/lamansky/typed-arrays
[Node.js] Returns an array of all Typed Array classes.
https://github.com/lamansky/typed-arrays
Last synced: 3 months ago
JSON representation
[Node.js] Returns an array of all Typed Array classes.
- Host: GitHub
- URL: https://github.com/lamansky/typed-arrays
- Owner: lamansky
- License: mit
- Created: 2018-02-15T07:26:55.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-15T07:31:56.000Z (over 8 years ago)
- Last Synced: 2025-05-29T02:43:50.284Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.txt
Awesome Lists containing this project
README
# typed-arrays
Returns an array of all [Typed Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays) classes: `Float32Array`, `Float64Array`, `Int8Array`, `Int16Array`, `Int32Array`, `Uint8Array`, `Uint8ClampedArray`, `Uint16Array`, and `Uint32Array`.
## Installation
Requires [Node.js](https://nodejs.org/) 5.0.0 or above.
```bash
npm i typed-arrays
```
## API
The module exports an object with two properties:
* `classes`: A function which, when called, will return an array of 9 Typed Array classes (functions).
* `names`: A function which, when called, will return an array of 9 Typed Array class name strings.
## Example
```javascript
const typedArrays = require('typed-arrays')
typedArrays.classes() // Array
typedArrays.names() // Array
```