Skip to main content

Function: join()

join(this, left, separator?): string | Markup

Concatenate items in an array-like object into a single string, separated by a separator string.

If the input value is not array-like, it will be coerced to one. If input array items are not strings, they will be converted to strings before joining.

Parameters

this: FilterContext

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

left: unknown

Any value. If it's not iterable, a new array will be used with the value as its first and only item.

separator?: unknown

A string to be used to separate input items in the output string. Defaults to a single space.

Returns

string | Markup

Items in the input array, concatenated together and separated by the given separator.

Defined in

src/builtin/filters/array.ts:41