Files
30-seconds-of-code/snippets/isTypedArray.md
2018-01-16 16:42:17 +02:00

276 B

isTypedArray

Checks if value is classified as a TypedArray object.

Use the instanceofoperator to check if the provided value is a TypedArray object.

const isTypedArray = val => val instanceof TypedArray;
isTypedArray(new TypedArray()); // true