UNPKG

es-toolkit

Version:

A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.

23 lines (22 loc) 595 B
import { isTypedArray as isTypedArray$1 } from "../../predicate/isTypedArray.mjs"; //#region src/compat/predicate/isTypedArray.ts /** * Checks if a value is a TypedArray. * @param x The value to check. * @returns Returns true if `x` is a TypedArray, false otherwise. * * @example * const arr = new Uint8Array([1, 2, 3]); * isTypedArray(arr); // true * * const regularArray = [1, 2, 3]; * isTypedArray(regularArray); // false * * const buffer = new ArrayBuffer(16); * isTypedArray(buffer); // false */ function isTypedArray(x) { return isTypedArray$1(x); } //#endregion export { isTypedArray };