* 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)
| 51710 | * @returns {Function} Returns the new spec function. |
| 51711 | */ |
| 51712 | function baseMatchesProperty(path, srcValue) { |
| 51713 | if (isKey(path) && isStrictComparable(srcValue)) { |
| 51714 | return matchesStrictComparable(toKey(path), srcValue); |
| 51715 | } |
| 51716 | return function (object) { |
| 51717 | var objValue = get(object, path); |
| 51718 | return objValue === undefined && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); |
| 51719 | }; |
| 51720 | } |
| 51721 | |
| 51722 | module.exports = baseMatchesProperty; |
| 51723 |
no test coverage detected