source: node_modules/ramda/es/uniq.js

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: 600 bytes
RevLine 
[d24f17c]1import identity from "./identity.js";
2import uniqBy from "./uniqBy.js";
3/**
4 * Returns a new list containing only one copy of each element in the original
5 * list. [`R.equals`](#equals) is used to determine equality.
6 *
7 * @func
8 * @memberOf R
9 * @since v0.1.0
10 * @category List
11 * @sig [a] -> [a]
12 * @param {Array} list The array to consider.
13 * @return {Array} The list of unique items.
14 * @example
15 *
16 * R.uniq([1, 1, 2, 1]); //=> [1, 2]
17 * R.uniq([1, '1']); //=> [1, '1']
18 * R.uniq([[42], [42]]); //=> [[42]]
19 */
20
21var uniq =
22/*#__PURE__*/
23uniqBy(identity);
24export default uniq;
Note: See TracBrowser for help on using the repository browser.