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

Usage in Deno

```typescript import { isArray } from "node:node__util.d.ts"; ```
isArray(object: unknown): object is unknown[]
Deprecated
Since v4.0.0 - Use `isArray` instead.
Alias for [`Array.isArray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray). Returns `true` if the given `object` is an `Array`. Otherwise, returns `false`. ```js import util from 'node:util'; util.isArray([]); // Returns: true util.isArray(new Array()); // Returns: true util.isArray({}); // Returns: false ```

Parameters

object: unknown

Return Type

object is unknown[]