Function join

  • Takes a separator string and a iterable or asynchronous iterable and returns a string with the concatenation of all the elements separated by the separator.

    Example

    const joinWithSpaces = join(" ");
    joinWithSpaces([1, 2, 3]); // "1 2 3"

    Returns

    Curried function with separator in context.

    Parameters

    • separator: string

      String to use as separator.

    Returns (<Iterable>(iterable: Iterable) => ReducerOutput<Iterable, string>)

      • <Iterable>(iterable: Iterable): ReducerOutput<Iterable, string>
      • Type Parameters

        • Iterable extends AsynchronousIterable<unknown>

        Parameters

        • iterable: Iterable

        Returns ReducerOutput<Iterable, string>