MCPcopy Create free account
hub / github.com/RubyLouvre/anu / baseMatchesProperty

Function baseMatchesProperty

test/babel.js:51712–51720  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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

Callers 1

baseIterateeFunction · 0.85

Calls 7

isKeyFunction · 0.85
isStrictComparableFunction · 0.85
matchesStrictComparableFunction · 0.85
toKeyFunction · 0.85
hasInFunction · 0.85
baseIsEqualFunction · 0.85
getFunction · 0.70

Tested by

no test coverage detected