Skip to main content

isArrayBuffer

function isArrayBuffer
Jump to headingisArrayBuffer(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 Jump to heading

Jump to headingobject: unknown

Return Type Jump to heading

object is ArrayBuffer
Back to top