Skip to main content

isArray

Validates if the supplied input is an array.

Signature

isArray(input: any): boolean

Parameters

NameTypeOptionalDescription
inputanyNoInput to validate.

Return value

Returns true if the input is an array.

Example

import { isArray } from "@tripetto/runner";

isArray([]); // Returns `true`
isArray([1]); // Returns `true`
isArray(new Array()); // Returns `true`
isArray({}); // Returns `false`