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

Usage in Deno

```typescript import { isSharedArrayBuffer } from "node:node__util--types.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