Skip to main content

Function: size()

size(this, left): number

Return the length of an array or string. If the input is an object or map, returns the number of keys.

Parameters

this: FilterContext

An object containing a reference to the active render context and any keyword/named arguments.

left: unknown

Any value.

Returns

number

The size of an object or 0 if a size can not be determined.

Defined in

src/builtin/filters/misc.ts:27