Function chunksOverlapping

  • Yields chunks of the iterable it such that the end of a chunk is the start of the next chunk.

    Eg, with the input [1,2,3,4,5] and a size of 2, we would get back [1,2], [2,3], [3,4], [4,5].

    Type Parameters

    • V

    Parameters

    • it: Iterable<V>
    • size: number

    Returns Generator<V[], void, unknown>