Emits up to count number of values, then stops the iteration.
count
import {pipe, take} from 'iter-ops';const i = pipe( [1, 2, 3, 4, 5], take(2));console.log(...i); //=> 1, 2 Copy
import {pipe, take} from 'iter-ops';const i = pipe( [1, 2, 3, 4, 5], take(2));console.log(...i); //=> 1, 2
Emits up to
count
number of values, then stops the iteration.