arraySize
Returns the size of the array/object as a number.
Signature
arraySize(input: any): number
Parameters
| Name | Type | Optional | Description |
|---|---|---|---|
input | any | No | Specifies the array. |
Return value
Returns the size of the array/object as a number.
Example
import { arraySize } from "@tripetto/builder";
arraySize([]); // Returns `0`
arraySize([1, 2, 3]); // Returns `3`