1 contributor
Like
Install take-while as a package?
Copied
npm i @bit/justin-capalbo.ramda.take-while
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example modifieddraft
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
and packages in Bit or NPM to the example. any of the 1 million componentstoggle layout
No preview available
chevron_left
chevron_right
takeWhile (
fn:
Function
,xs:
) : Array
Array
Returns a new list containing the first n
elements of a given list,
passing each value to the supplied predicate function, and terminating when
the predicate function returns false
. Excludes the element that caused the
predicate function to fail. The predicate function is passed one argument:
(value).
Dispatches to the takeWhile
method of the second argument, if present.
Acts as a transducer if a transformer is given in list position.
Example
Arguments
fn:
Function
The function called per iteration.
xs:
Array
The collection to iterate over.
Returns
Array
A new array.