Sha256: 67c8e0de8c0c3209fbc506831bc09fc4330266d468f90bbc2ceb5d3c92bd93c8

Contents?: true

Size: 1.3 KB

Versions: 303

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

303 entries across 279 versions & 33 rubygems

Version Path
clapton-0.0.4 lib/clapton/javascripts/node_modules/lodash/isMatchWith.js
clapton-0.0.3 lib/clapton/javascripts/node_modules/lodash/isMatchWith.js
clapton-0.0.2 lib/clapton/javascripts/node_modules/lodash/isMatchWith.js
clapton-0.0.1 lib/clapton/javascripts/node_modules/lodash/isMatchWith.js
immosquare-cleaner-0.1.47 node_modules/lodash/isMatchWith.js
immosquare-cleaner-0.1.46 node_modules/lodash/isMatchWith.js
immosquare-cleaner-0.1.45 node_modules/lodash/isMatchWith.js
immosquare-cleaner-0.1.44 node_modules/lodash/isMatchWith.js
boring_generators-0.14.0 tmp/templates/app_template/node_modules/lodash/isMatchWith.js
immosquare-cleaner-0.1.43 node_modules/lodash/isMatchWith.js
immosquare-cleaner-0.1.42 node_modules/lodash/isMatchWith.js
immosquare-cleaner-0.1.41 node_modules/lodash/isMatchWith.js
immosquare-cleaner-0.1.40 node_modules/lodash/isMatchWith.js
sumomo-0.10.8 data/sumomo/api_modules/node_modules/lodash/isMatchWith.js
immosquare-cleaner-0.1.39 node_modules/lodash/isMatchWith.js
immosquare-cleaner-0.1.38 node_modules/lodash/isMatchWith.js
optimacms-0.1.61 spec/dummy/node_modules/lodash/isMatchWith.js
boring_generators-0.13.0 tmp/templates/app_template/node_modules/lodash/isMatchWith.js
immosquare-cleaner-0.1.32 node_modules/lodash/isMatchWith.js
immosquare-cleaner-0.1.31 node_modules/lodash/isMatchWith.js