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

Usage in Deno

```typescript import { isBuffer } from "node:node__util.d.ts"; ```
isBuffer(object: unknown): object is Buffer
Deprecated
Since v4.0.0 - Use `isBuffer` instead.
Returns `true` if the given `object` is a `Buffer`. Otherwise, returns `false`. ```js import util from 'node:util'; util.isBuffer({ length: 0 }); // Returns: false util.isBuffer([]); // Returns: false util.isBuffer(Buffer.from('hello world')); // Returns: true ```

Parameters

object: unknown

Return Type

object is Buffer