TypeTags .isTypedArray

Overview

The .isTypedArray predicate allows us to check if an object is a TypedArray object or has a typed-array type tag.

Usage

TypeTags.isTypedArray(value)
  • Checks if value is an iterator data type or has an iterator type tag.
import { TypeTags } from 'typetags'
const float = new Float32Array(12)
TypeTags.isTypedArray(float)
// → true
const tag = TypeTags.get(float)
// → [object Float32Array]
TypeTags.isTypedArray(tag)
// → true
const bigint = 12n
TypeTags.isTypedArray(bigint)
// → false

Signature

isTypedArray(obj: any): boolean