Skip to content

@yantrix/functions v0.5.2 • Docs


Yantrix API / @yantrix/functions / Transformers / len

Function: len() ​

len(str) ​

ts
function len(str): number

Returns the length of a string.

Parameters ​

• str: string

The string to evaluate.

Returns ​

number

The length of the string.

len(list) ​

ts
function len<T>(list): number

Returns the length of an array.

Type Parameters ​

• T

The type of the elements in the array.

Parameters ​

• list: T[]

The array to evaluate.

Returns ​

number

The length of the array.