drop-repeats

v0.9.6arrow_drop_down
v0.9.6
STATUS
Passing
DOWNLOADS
2
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
3 KB
Returns a new list without any consecutively repeating elements.
1 contributor
Install drop-repeats as a package?
Copied
npm i @bit/justin-capalbo.ramda.drop-repeats
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right
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.

Help and resources