Start sharing components as a team!Share components as a team!Join Bit to build your applications faster.Get Started Free

uniq

v0.26.1arrow_drop_down
v0.26.1
STATUS
Passing
DOWNLOADS
8
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
7 months ago
SIZE
3 KB
subject
Returns a new list containing only one copy of each element in the original list.
1 contributor
Use uniq in your project ?
Copied
npm i @bit/ramda.ramda.uniq
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
React
React
Vue
Angular
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';
revert changes
reload
toggle layout
maximize
uniq([1, 1, 2, 1]);
modifieddraft
chevron_left
chevron_right
uniq (
list:Array
) : Array

Returns a new list containing only one copy of each element in the original list. R.equals is used to determine equality.

Example
R.uniq([1, 1, 2, 1]); //=> [1, 2]
     R.uniq([1, '1']);     //=> [1, '1']
     R.uniq([[42], [42]]); //=> [[42]]
Argument
list: Array

The array to consider.

Returns
Array

The list of unique items.