1 var baseIsMatch = require('./_baseIsMatch'),
2 getMatchData = require('./_getMatchData');
5 * Performs a partial deep comparison between `object` and `source` to
6 * determine if `object` contains equivalent property values.
8 * **Note:** This method is equivalent to `_.matches` when `source` is
11 * Partial comparisons will match empty array and empty object `source`
12 * values against any array or object value, respectively. See `_.isEqual`
13 * for a list of supported value comparisons.
19 * @param {Object} object The object to inspect.
20 * @param {Object} source The object of property values to match.
21 * @returns {boolean} Returns `true` if `object` is a match, else `false`.
24 * var object = { 'a': 1, 'b': 2 };
26 * _.isMatch(object, { 'b': 2 });
29 * _.isMatch(object, { 'b': 1 });
32 function isMatch(object, source) {
33 return object === source || baseIsMatch(object, source, getMatchData(source));
36 module.exports = isMatch;