Skip to content

Commit f468f6e

Browse files
committed
Merge pull request #2120 from phadej/uniq-doc
Make _.uniq doc more precise
2 parents 1bbccb6 + c49eb20 commit f468f6e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

index.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -939,14 +939,15 @@ <h2 id="arrays">Array Functions</h2>
939939
<span class="alias">Alias: <b>unique</b></span>
940940
<br />
941941
Produces a duplicate-free version of the <b>array</b>, using <i>===</i> to test
942-
object equality. If you know in advance that the <b>array</b> is sorted,
942+
object equality. In particular only the first occurence of each value is kept.
943+
If you know in advance that the <b>array</b> is sorted,
943944
passing <i>true</i> for <b>isSorted</b> will run a much faster algorithm.
944945
If you want to compute unique items based on a transformation, pass an
945946
<b>iteratee</b> function.
946947
</p>
947948
<pre>
948-
_.uniq([1, 2, 1, 3, 1, 4]);
949-
=&gt; [1, 2, 3, 4]
949+
_.uniq([1, 2, 1, 4, 1, 3]);
950+
=&gt; [1, 2, 4, 3]
950951
</pre>
951952

952953
<p id="zip">

0 commit comments

Comments
 (0)