mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 19:07:49 +00:00
Clarify how comparison with empty sources is handled by _.matches, _.isMatch and _.matchesProperty. (#2548)
This commit is contained in:
committed by
John-David Dalton
parent
73b2f20509
commit
9c4baf7645
13
lodash.js
13
lodash.js
@@ -11344,8 +11344,9 @@
|
|||||||
* Performs a partial deep comparison between `object` and `source` to
|
* Performs a partial deep comparison between `object` and `source` to
|
||||||
* determine if `object` contains equivalent property values.
|
* determine if `object` contains equivalent property values.
|
||||||
*
|
*
|
||||||
* **Note:** This method supports comparing the same values as `_.isEqual`
|
* **Note:** If source is empty, this method returns true. Otherwise, it supports
|
||||||
* and is equivalent to `_.matches` when `source` is partially applied.
|
* comparing the same values as `_.isEqual` and is equivalent to `_.matches`
|
||||||
|
* when `source` is partially applied.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
@@ -15060,8 +15061,9 @@
|
|||||||
* object and `source`, returning `true` if the given object has equivalent
|
* object and `source`, returning `true` if the given object has equivalent
|
||||||
* property values, else `false`.
|
* property values, else `false`.
|
||||||
*
|
*
|
||||||
* **Note:** The created function supports comparing the same values as
|
* **Note:** If source is empty, the created function returns true. Otherwise
|
||||||
* `_.isEqual` is equivalent to `_.isMatch` with `source` partially applied.
|
* it supports comparing the same values as `_.isEqual` and is equivalent to
|
||||||
|
* `_.isMatch` with `source` partially applied.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
@@ -15088,7 +15090,8 @@
|
|||||||
* value at `path` of a given object to `srcValue`, returning `true` if the
|
* value at `path` of a given object to `srcValue`, returning `true` if the
|
||||||
* object value is equivalent, else `false`.
|
* object value is equivalent, else `false`.
|
||||||
*
|
*
|
||||||
* **Note:** This method supports comparing the same values as `_.isEqual`.
|
* **Note:** If `srcValue` is an empty object, this method returns true. Otherwise,
|
||||||
|
* it supports comparing the same values as `_.isEqual`.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
|
|||||||
Reference in New Issue
Block a user