1 var baseIsEqual = require('./_baseIsEqual'),
2 get = require('./get'),
3 hasIn = require('./hasIn');
5 /** Used to compose bitmasks for comparison styles. */
6 var UNORDERED_COMPARE_FLAG = 1,
7 PARTIAL_COMPARE_FLAG = 2;
10 * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
13 * @param {string} path The path of the property to get.
14 * @param {*} srcValue The value to match.
15 * @returns {Function} Returns the new function.
17 function baseMatchesProperty(path, srcValue) {
18 return function(object) {
19 var objValue = get(object, path);
20 return (objValue === undefined && objValue === srcValue)
22 : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
26 module.exports = baseMatchesProperty;