Skip to content

uint16 array

Nicholas Berlette edited this page Jun 19, 2025 · 1 revision

@nick/is/uint16-array

isUint16Array

Signature

function isUint16Array(it: unknown): it is Uint16Array;

Check if the given value is a Uint16Array instance.

Parameters
Name Info
it The value to check.
Returns

true if the value is a Uint16Array instance, false otherwise.

Category

Binary Data Structures

Examples

import { isUint16Array } from "jsr:@nick/is/uint16array";

const arr = new Uint16Array(8);
isUint16Array(arr); // true
isUint16Array(arr.buffer); // false
Clone this wiki locally