Function split

  • like string.split => output arrays of elements and use the given parameter as a delimiter

    Example

       pipe(
    itr8FromArray([ 'hello', '|', 'world' ]),
    split('|'), // => [ ['hello'], ['world'] ]
    );

    Example

       pipe(
    itr8FromArray([ 1, true, 2, 3, true, 4 ]),
    split(true), // => [ [1], [2,3], [4] ]
    );

    Type Parameters

    • TIn

    Parameters

    • delimiter: any

    Returns TTransIteratorSyncOrAsync<TIn, TIn>

Generated using TypeDoc