Skip to content

data view

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

@nick/is/data-view

isDataView

Signature

function isDataView(it: unknown): it is DataView;

Checks if a given value is a DataView.

Parameters
Name Info
it The value to check.
Returns

true if the value is a DataView, false otherwise.

Category

Binary Data Structures

Examples

import { isDataView } from "jsr:@nick/is/data-view";

const buffer = new ArrayBuffer(8);
const view = new DataView(buffer);
console.log(isDataView(view)); // true
console.log(isDataView(buffer)); // false
Clone this wiki locally