Skip to content

uint8 array

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

@nick/is/uint8-array

isUint8Array

Signature

function isUint8Array(it: unknown): it is Uint8Array;

Check if the given value is a Uint8Array instance.

Parameters
Name Info
it The value to check.
Returns

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

Category

Binary Data Structures

Examples

import { isUint8Array } from "jsr:@nick/is/uint8array";

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