Skip to main content

arraySize

Returns the size of the array/object as a number.

Signature

arraySize(input: any): number

Parameters

NameTypeOptionalDescription
inputanyNoSpecifies the array.

Return value

Returns the size of the array/object as a number.

Example

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

arraySize([]); // Returns `0`
arraySize([1, 2, 3]); // Returns `3`