An object with options for the joinToString function.

See

joinToString

Type Parameters

  • T

Hierarchy

  • JoinToStringOptions

Properties

limit: number

The maximum amount of items, before iteration is stopped and the truncated suffix is added.

prefix: string

The string at the front of the result. Will always be added.

separator: string

The separator between items and before a possible truncate suffix.

suffix: string

The string at the end of the result. Will always be added.

transform: ((item: T, index: number) => string)

Type declaration

    • (item: T, index: number): string
    • A transform function to transform the items of the iterable to a string.

      Parameters

      • item: T

        an item from the iterable

      • index: number

        the current iteration index

      Returns string

truncated: string

The indicator string that the result was truncated, e.g. '...'. The separator will be inserted before the truncated substring.

Generated using TypeDoc