Skip to main content
types.isSharedArrayBuffer - node__util.d.ts - Node documentation
function types.isSharedArrayBuffer

Usage in Deno

```typescript import { types } from "node:node__util.d.ts"; ```
isSharedArrayBuffer(object: unknown): object is SharedArrayBuffer
Returns `true` if the value is a built-in [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance. This does _not_ include [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instances. Usually, it is desirable to test for both; See `util.types.isAnyArrayBuffer()` for that. ```js util.types.isSharedArrayBuffer(new ArrayBuffer()); // Returns false util.types.isSharedArrayBuffer(new SharedArrayBuffer()); // Returns true ```

Parameters

object: unknown

Return Type

object is SharedArrayBuffer