Checks if the given value is a DataView object.

Syntax

TypeScript
import { isDataView } from '@opentf/std';

isDataView(val: unknown): val is DataView

Examples

TypeScript
const buffer = new ArrayBuffer(8);

isDataView(buffer) //=> false

isDataView(new Uint8Array(buffer)) //=> false

isDataView(new DataView(buffer)) //=> true
Last updated on
Edit this page