Skip to main content
types.isArrayBuffer - util - Node documentation
function types.isArrayBuffer

Usage in Deno

import { types } from "node:util";
isArrayBuffer(object: unknown): object is ArrayBuffer

Returns true if the value is a built-in ArrayBuffer instance. This does not include SharedArrayBuffer instances. Usually, it is desirable to test for both; See util.types.isAnyArrayBuffer() for that.

util.types.isArrayBuffer(new ArrayBuffer());  // Returns true
util.types.isArrayBuffer(new SharedArrayBuffer());  // Returns false

Parameters

object: unknown

Return Type

object is ArrayBuffer
Back to top