drop-repeats-with
v0.9.6arrow_drop_downv0.9.6
STATUS
Passing
DOWNLOADS
3
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
1 KB
Returns a new list without any consecutively repeating elements.
1 contributor
Like
Install drop-repeats-with as a package?
Copied
npm i @bit/justin-capalbo.ramda.drop-repeats-with
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
dropRepeatsWith (
pred:
Function
,list:
) : Array
Array
Returns a new list without any consecutively repeating elements. Equality is determined by applying the supplied predicate to each pair of consecutive elements. The first element in a series of equal elements will be preserved.
Acts as a transducer if a transformer is given in list position.
Example
Arguments
pred:
Function
A predicate used to test whether two items are equal.
list:
Array
The array to consider.
Returns
Array
`list` without repeating elements.