Variable: takeWhile
const
takeWhile:SubWhile
Defined in: splices.d.ts:94
Returns an iterable containing the values of iterable
in iteration order
up until but not including the first value for which fn
returns a falsy
value.
Example
console.log(
pipe(
[1, 2, 3, 4, 5, 6, 7, 8, `sloth`],
takeWhile(value => value < 5),
reduce(toArray()),
),
)
//=> [ 1, 2, 3, 4 ]
Since
v0.0.1