typed-arrays

Returns an array of all Typed Array classes.

Usage no npm install needed!

<script type="module">
  import typedArrays from 'https://cdn.skypack.dev/typed-arrays';
</script>

README

typed-arrays

Returns an array of all Typed Array classes: Float32Array, Float64Array, Int8Array, Int16Array, Int32Array, Uint8Array, Uint8ClampedArray, Uint16Array, and Uint32Array.

Installation

Requires Node.js 5.0.0 or above.

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

const typedArrays = require('typed-arrays')

typedArrays.classes() // Array
typedArrays.names() // Array