main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
638 bytes
|
Line | |
---|
1 | var identity =
|
---|
2 | /*#__PURE__*/
|
---|
3 | require("./identity.js");
|
---|
4 |
|
---|
5 | var uniqBy =
|
---|
6 | /*#__PURE__*/
|
---|
7 | require("./uniqBy.js");
|
---|
8 | /**
|
---|
9 | * Returns a new list containing only one copy of each element in the original
|
---|
10 | * list. [`R.equals`](#equals) is used to determine equality.
|
---|
11 | *
|
---|
12 | * @func
|
---|
13 | * @memberOf R
|
---|
14 | * @since v0.1.0
|
---|
15 | * @category List
|
---|
16 | * @sig [a] -> [a]
|
---|
17 | * @param {Array} list The array to consider.
|
---|
18 | * @return {Array} The list of unique items.
|
---|
19 | * @example
|
---|
20 | *
|
---|
21 | * R.uniq([1, 1, 2, 1]); //=> [1, 2]
|
---|
22 | * R.uniq([1, '1']); //=> [1, '1']
|
---|
23 | * R.uniq([[42], [42]]); //=> [[42]]
|
---|
24 | */
|
---|
25 |
|
---|
26 |
|
---|
27 | var uniq =
|
---|
28 | /*#__PURE__*/
|
---|
29 | uniqBy(identity);
|
---|
30 | module.exports = uniq; |
---|
Note:
See
TracBrowser
for help on using the repository browser.