Function itr8ToString

  • Turns an iterator into a single string. The strings will simply be 'glued' together, so if you need a separator, use interperse first.

    It is the equivalent of Array.join('').

    Example

     pipe(
    itr8FromArray(['Hello', 'Goodbye']),
    intersperse(' / '), // adds | between every 2 elements
    itr8ToString,
    ) // => 'Hello / Goodbye'

    const alphabet = pipe(
    itr8Range(0, 25),
    map((i: number) => String.fromCharCode("A".charCodeAt(0) + i)),
    itr8ToString
    ); // => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

    Returns

    a string

    Type Parameters

    • T

    Parameters

    • iterator: Iterator<T, any, undefined> | AsyncIterator<T, any, undefined>

    Returns string | Promise<string>

Generated using TypeDoc