isArray
Validates if the supplied input is an array.
Signature
isArray(input: any): boolean
Parameters
Name | Type | Optional | Description |
---|---|---|---|
input | any | No | Input to validate. |
Return value
Returns true
if the input is an array.
Example
import { isArray } from "@tripetto/builder";
isArray([]); // Returns `true`
isArray([1]); // Returns `true`
isArray(new Array()); // Returns `true`
isArray({}); // Returns `false`