1
0
Fork 0
js-utils/docs/api/js-utils.countof.md

646 B

Home > @apextoaster/js-utils > countOf

countOf() function

Calculate the "length" of an array or value.

Arrays return their length, single values return 1, and nil values return 0. This counts the number of elements that setOrPush would add.

Signature:

export declare function countOf(val: unknown): number;

Parameters

Parameter Type Description
val unknown

Returns:

number