Skip to content

Commit 543dfbe

Browse files
authored
Merge pull request #3224 from paulofreitas/collection-uniquestrict
[5.4] Document Collection::uniqueStrict() method
2 parents 728fe36 + eb77479 commit 543dfbe

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

collections.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ For the remainder of this documentation, we'll discuss each method available on
111111
[transform](#method-transform)
112112
[union](#method-union)
113113
[unique](#method-unique)
114+
[uniqueStrict](#method-uniquestrict)
114115
[values](#method-values)
115116
[when](#method-when)
116117
[where](#method-where)
@@ -1384,6 +1385,13 @@ You may also pass your own callback to determine item uniqueness:
13841385
]
13851386
*/
13861387

1388+
The `unique` method uses "loose" comparisons when checking item values, meaning a string with an integer value will be considered equal to an integer of the same value. Use the `uniqueStrict` method to filter using "strict" comparisons.
1389+
1390+
<a name="method-uniquestrict"></a>
1391+
#### `uniqueStrict()` {#collection-method}
1392+
1393+
This method has the same signature as the `unique` method; however, all values are compared using "strict" comparisons.
1394+
13871395
<a name="method-values"></a>
13881396
#### `values()` {#collection-method}
13891397

0 commit comments

Comments
 (0)