basant307/AI_Governance_Project
045
1var baseIsMatch = require('./_baseIsMatch'),2 getMatchData = require('./_getMatchData');3 4/**5 * This method is like `_.isMatch` except that it accepts `customizer` which6 * is invoked to compare values. If `customizer` returns `undefined`, comparisons7 * are handled by the method instead. The `customizer` is invoked with five8 * arguments: (objValue, srcValue, index|key, object, source).9 *10 * @static11 * @memberOf _12 * @since 4.0.013 * @category Lang14 * @param {Object} object The object to inspect.15 * @param {Object} source The object of property values to match.16 * @param {Function} [customizer] The function to customize comparisons.17 * @returns {boolean} Returns `true` if `object` is a match, else `false`.18 * @example19 *20 * function isGreeting(value) {21 * return /^h(?:i|ello)$/.test(value);22 * }23 *24 * function customizer(objValue, srcValue) {25 * if (isGreeting(objValue) && isGreeting(srcValue)) {26 * return true;27 * }28 * }29 *30 * var object = { 'greeting': 'hello' };31 * var source = { 'greeting': 'hi' };32 *33 * _.isMatchWith(object, source, customizer);34 * // => true35 */36function isMatchWith(object, source, customizer) {37 customizer = typeof customizer == 'function' ? customizer : undefined;38 return baseIsMatch(object, source, getMatchData(source), customizer);39}40 41module.exports = isMatchWith;42 