mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Rename value param to srcValue.
This commit is contained in:
@@ -2468,12 +2468,12 @@
|
|||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {string} path The path of the property to get.
|
* @param {string} path The path of the property to get.
|
||||||
* @param {*} value The value to compare.
|
* @param {*} srcValue The value to compare.
|
||||||
* @returns {Function} Returns the new function.
|
* @returns {Function} Returns the new function.
|
||||||
*/
|
*/
|
||||||
function baseMatchesProperty(path, value) {
|
function baseMatchesProperty(path, srcValue) {
|
||||||
var isArr = isArray(path),
|
var isArr = isArray(path),
|
||||||
isCommon = isKey(path) && isStrictComparable(value),
|
isCommon = isKey(path) && isStrictComparable(srcValue),
|
||||||
pathKey = (path + '');
|
pathKey = (path + '');
|
||||||
|
|
||||||
path = toPath(path);
|
path = toPath(path);
|
||||||
@@ -2491,9 +2491,9 @@
|
|||||||
key = last(path);
|
key = last(path);
|
||||||
object = toObject(object);
|
object = toObject(object);
|
||||||
}
|
}
|
||||||
return object[key] === value
|
return object[key] === srcValue
|
||||||
? (value !== undefined || (key in object))
|
? (srcValue !== undefined || (key in object))
|
||||||
: baseIsEqual(value, object[key], undefined, true);
|
: baseIsEqual(srcValue, object[key], undefined, true);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -11365,7 +11365,7 @@
|
|||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Utility
|
* @category Utility
|
||||||
* @param {Array|string} path The path of the property to get.
|
* @param {Array|string} path The path of the property to get.
|
||||||
* @param {*} value The value to match.
|
* @param {*} srcValue The value to match.
|
||||||
* @returns {Function} Returns the new function.
|
* @returns {Function} Returns the new function.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
@@ -11377,8 +11377,8 @@
|
|||||||
* _.find(users, _.matchesProperty('user', 'fred'));
|
* _.find(users, _.matchesProperty('user', 'fred'));
|
||||||
* // => { 'user': 'fred' }
|
* // => { 'user': 'fred' }
|
||||||
*/
|
*/
|
||||||
function matchesProperty(path, value) {
|
function matchesProperty(path, srcValue) {
|
||||||
return baseMatchesProperty(path, baseClone(value, true));
|
return baseMatchesProperty(path, baseClone(srcValue, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user