UNPKG

632 BJavaScriptView Raw
1var identity =
2/*#__PURE__*/
3require("./identity");
4
5var uniqBy =
6/*#__PURE__*/
7require("./uniqBy");
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
27var uniq =
28/*#__PURE__*/
29uniqBy(identity);
30module.exports = uniq;
\No newline at end of file