function isArray
Usage in Deno
import { isArray } from "node:util";
isArray(object: unknown): object is unknown[]
Deprecated
Since v4.0.0 - Use isArray
instead.
Alias for Array.isArray()
.
Returns true
if the given object
is an Array
. Otherwise, returns false
.
import util from 'node:util'; util.isArray([]); // Returns: true util.isArray(new Array()); // Returns: true util.isArray({}); // Returns: false
object is unknown[]