• Joins the source into a string.

    Type Parameters

    • T

      Type of items in the source.

    Parameters

    • separator: string = ","

      Separator between elements.

    Returns CollectorFunction<T, string>

    Collector that joins the source into a string.

    const result = join<number>()([1, 2, 3]);
    console.log(result); // "1,2,3"