Skip to main content

Variable: dropWhile

const dropWhile: SubWhile

Defined in: splices.d.ts:30

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

Example

import { dropWhile, pipe, reduce, toArray } from 'lfi'

console.log(
pipe(
[`sloth`, `lazy`, `active`, `sleep`, `awake`],
dropWhile(word => word.includes(`l`)),
reduce(toArray()),
),
)
//=> [ 'active', 'sleep', 'awake' ]
Playground

Since

v0.0.1