-
-
Notifications
You must be signed in to change notification settings - Fork 0
data view
Nicholas Berlette edited this page Jun 19, 2025
·
1 revision
function isDataView(it: unknown): it is DataView;
Checks if a given value is a DataView
.
Name | Info |
---|---|
it |
The value to check. |
true
if the value is a DataView
, false
otherwise.
Binary Data Structures
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