Share your code. Components are building blocks, you are the architect.

utils/drop-repeats
v1.1.0
1.1.0
Returns a new list without any consecutively repeating elements

Please configure Bit as a scoped registry to install components with NPM.Learn more

npm config set '@bit:registry' https://node.bitsrc.io
Use utils/drop-repeats in your project
npm i @bit/bit.ramda.utils.drop-repeats
Copied

dropRepeats (list:Array) : Array

Returns a new list without any consecutively repeating elements. R.equals is used to determine equality.

Acts as a transducer if a transformer is given in list position.

Example

R.dropRepeats([1, 1, 1, 2, 3, 4, 4, 2, 2]); //=> [1, 2, 3, 4, 2]

Argument

list: Array

The array to consider.

Returns

Array

`list` without repeating elements.