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