Skips values while the predicate test succeeds.
import {pipe, skipWhile} from 'iter-ops';const i = pipe( [1, 2, 3, 4, 5, 6, 7, 8, 9], skipWhile(a => a < 5) // skip while value < 5);console.log(...i); //=> 5, 6, 7, 8, 9 Copy
import {pipe, skipWhile} from 'iter-ops';const i = pipe( [1, 2, 3, 4, 5, 6, 7, 8, 9], skipWhile(a => a < 5) // skip while value < 5);console.log(...i); //=> 5, 6, 7, 8, 9
Note that the predicate can only return a Promise inside an asynchronous pipeline, or else the Promise will be treated as a truthy value.
Promise
Skips values while the predicate test succeeds.
Note that the predicate can only return a
Promise
inside an asynchronous pipeline, or else thePromise
will be treated as a truthy value.