* The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. * * @private * @param {string} path The path of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function.
(path, srcValue)
| 14020 | * @returns {Function} Returns the new spec function. |
| 14021 | */ |
| 14022 | function baseMatchesProperty(path, srcValue) { |
| 14023 | if (isKey(path) && isStrictComparable(srcValue)) { |
| 14024 | return matchesStrictComparable(toKey(path), srcValue); |
| 14025 | } |
| 14026 | return function(object) { |
| 14027 | var objValue = get(object, path); |
| 14028 | return (objValue === undefined && objValue === srcValue) |
| 14029 | ? hasIn(object, path) |
| 14030 | : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); |
| 14031 | }; |
| 14032 | } |
| 14033 | |
| 14034 | module.exports = baseMatchesProperty; |
| 14035 |
no test coverage detected
searching dependent graphs…