Skip to content

Commit b7c11ba

Browse files
authored
Merge pull request #3222 from paulofreitas/collection-containsstrict
[5.4] Document Collection::containsStrict() method
2 parents befea2f + b346638 commit b7c11ba

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

collections.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ For the remainder of this documentation, we'll discuss each method available on
5353
[collapse](#method-collapse)
5454
[combine](#method-combine)
5555
[contains](#method-contains)
56+
[containsStrict](#method-containsstrict)
5657
[count](#method-count)
5758
[diff](#method-diff)
5859
[diffKeys](#method-diffkeys)
@@ -246,6 +247,12 @@ Finally, you may also pass a callback to the `contains` method to perform your o
246247

247248
// false
248249

250+
The `contains` 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 `containsStrict` method to filter using "strict" comparisons.
251+
252+
#### `containsStrict()` {#collection-method}
253+
254+
This method has the same signature as the `contains` method; however, all values are compared using "strict" comparisons.
255+
249256
<a name="method-count"></a>
250257
#### `count()` {#collection-method}
251258

0 commit comments

Comments
 (0)