Splits values into pages of fixed size (last page can be smaller).
import {pipe, page} from 'iter-ops';const i = pipe( [1, 2, 3, 4, 5], page(2));console.log(...i); //=> [1, 2], [3, 4], [5] Copy
import {pipe, page} from 'iter-ops';const i = pipe( [1, 2, 3, 4, 5], page(2));console.log(...i); //=> [1, 2], [3, 4], [5]
TypeError: 'Page size >= 1 is required: ...' when size is less than 1 or not a number.
TypeError: 'Page size >= 1 is required: ...'
size
number
Splits values into pages of fixed size (last page can be smaller).