mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Clarify _.uniq docs. [ci skip]
This commit is contained in:
@@ -5750,12 +5750,13 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a duplicate-value-free version of an array using `SameValueZero`
|
* Creates a duplicate-free version of an array, using `SameValueZero` for
|
||||||
* for equality comparisons. Providing `true` for `isSorted` performs a faster
|
* equality comparisons, in which only the first occurence of each element
|
||||||
* search algorithm for sorted arrays. If an iteratee function is provided it
|
* is kept. Providing `true` for `isSorted` performs a faster search algorithm
|
||||||
* is invoked for each value in the array to generate the criterion by which
|
* for sorted arrays. If an iteratee function is provided it is invoked for
|
||||||
* uniqueness is computed. The `iteratee` is bound to `thisArg` and invoked
|
* each element in the array to generate the criterion by which uniqueness
|
||||||
* with three arguments: (value, index, array).
|
* is computed. The `iteratee` is bound to `thisArg` and invoked with three
|
||||||
|
* arguments: (value, index, array).
|
||||||
*
|
*
|
||||||
* If a property name is provided for `iteratee` the created `_.property`
|
* If a property name is provided for `iteratee` the created `_.property`
|
||||||
* style callback returns the property value of the given element.
|
* style callback returns the property value of the given element.
|
||||||
@@ -5783,8 +5784,8 @@
|
|||||||
* @returns {Array} Returns the new duplicate-value-free array.
|
* @returns {Array} Returns the new duplicate-value-free array.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* _.uniq([1, 2, 1]);
|
* _.uniq([2, 1, 2]);
|
||||||
* // => [1, 2]
|
* // => [2, 1]
|
||||||
*
|
*
|
||||||
* // using `isSorted`
|
* // using `isSorted`
|
||||||
* _.uniq([1, 1, 2], true);
|
* _.uniq([1, 1, 2], true);
|
||||||
|
|||||||
Reference in New Issue
Block a user