Sha256: 67c8e0de8c0c3209fbc506831bc09fc4330266d468f90bbc2ceb5d3c92bd93c8

Contents?: true

Size: 1.3 KB

Versions: 300

Compression:

Stored size: 1.3 KB

Contents

var baseIsMatch = require('./_baseIsMatch'),
    getMatchData = require('./_getMatchData');

/**
 * This method is like `_.isMatch` except that it accepts `customizer` which
 * is invoked to compare values. If `customizer` returns `undefined`, comparisons
 * are handled by the method instead. The `customizer` is invoked with five
 * arguments: (objValue, srcValue, index|key, object, source).
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {Object} object The object to inspect.
 * @param {Object} source The object of property values to match.
 * @param {Function} [customizer] The function to customize comparisons.
 * @returns {boolean} Returns `true` if `object` is a match, else `false`.
 * @example
 *
 * function isGreeting(value) {
 *   return /^h(?:i|ello)$/.test(value);
 * }
 *
 * function customizer(objValue, srcValue) {
 *   if (isGreeting(objValue) && isGreeting(srcValue)) {
 *     return true;
 *   }
 * }
 *
 * var object = { 'greeting': 'hello' };
 * var source = { 'greeting': 'hi' };
 *
 * _.isMatchWith(object, source, customizer);
 * // => true
 */
function isMatchWith(object, source, customizer) {
  customizer = typeof customizer == 'function' ? customizer : undefined;
  return baseIsMatch(object, source, getMatchData(source), customizer);
}

module.exports = isMatchWith;

Version data entries

300 entries across 276 versions & 32 rubygems

Version Path
disco_app-0.18.2 test/dummy/node_modules/lodash/isMatchWith.js
sumomo-0.8.15 data/sumomo/api_modules/node_modules/lodash/isMatchWith.js
trusty-cms-5.0.7 node_modules/lodash/isMatchWith.js
appmap-0.72.2 ./node_modules/lodash/isMatchWith.js
trusty-cms-5.0.6 node_modules/lodash/isMatchWith.js
appmap-0.72.1 ./node_modules/lodash/isMatchWith.js
appmap-0.72.0 ./node_modules/lodash/isMatchWith.js
trusty-cms-5.0.5 node_modules/lodash/isMatchWith.js
trusty-cms-5.0.4 node_modules/lodash/isMatchWith.js
appmap-0.71.0 ./node_modules/lodash/isMatchWith.js
disco_app-0.16.1 test/dummy/node_modules/lodash/isMatchWith.js
appmap-0.70.2 ./node_modules/lodash/isMatchWith.js
sumomo-0.8.14 data/sumomo/api_modules/node_modules/lodash/isMatchWith.js
appmap-0.70.1 ./node_modules/lodash/isMatchWith.js
appmap-0.70.0 ./node_modules/lodash/isMatchWith.js
appmap-0.69.0 ./node_modules/lodash/isMatchWith.js
sumomo-0.8.13 data/sumomo/api_modules/node_modules/lodash/isMatchWith.js
appmap-0.68.2 ./node_modules/lodash/isMatchWith.js
appmap-0.68.1 ./node_modules/lodash/isMatchWith.js
disco_app-0.15.2 test/dummy/node_modules/lodash/isMatchWith.js