Skip to main content

Variable: dropWhileAsync

const dropWhileAsync: SubWhileAsync

Defined in: splices.d.ts:50

Returns an async iterable containing the values of asyncIterable in iteration order starting with the first value for which fn returns a value awaitable to a falsy value.

Example

console.log(
await pipe(
asAsync([1, 2, 3, 4, 5, 6, 7, 8, `sloth`]),
dropWhileAsync(value => value < 5),
reduceAsync(toArray()),
),
)
//=> [ 5, 6, 7, 8, 'sloth' ]

Since

v0.0.1