drop-last-while
v0.9.6arrow_drop_downv0.9.6
STATUS
Passing
DOWNLOADS
2
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
2 KB
Returns a new list excluding all the tailing elements of a given list which
satisfy the supplied predicate function.
1 contributor
Like
Install drop-last-while as a package?
Copied
npm i @bit/justin-capalbo.ramda.drop-last-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
dropLastWhile (
predicate:
Function
,xs:
) : Array
Array
Returns a new list excluding all the tailing elements of a given list which
satisfy the supplied predicate function. It passes each value from the right
to the supplied predicate function, skipping elements until the predicate
function returns a falsy
value. The predicate function is applied to one argument:
(value).
Acts as a transducer if a transformer is given in list position.
Example
Arguments
predicate:
Function
The function to be called on each element
xs:
Array
The collection to iterate over.
Returns
Array
A new array without any trailing elements that return `falsy` values from the `predicate`.