1 var baseIsMatch = require('./internal/baseIsMatch'),
2 getMatchData = require('./internal/getMatchData');
5 * Performs a deep comparison between `object` and `source` to determine if
6 * `object` contains equivalent property values.
8 * **Note:** This method supports comparing the same values as `_.isEqual`.
13 * @param {Object} object The object to inspect.
14 * @param {Object} source The object of property values to match.
15 * @returns {boolean} Returns `true` if `object` is a match, else `false`.
18 * var object = { 'user': 'fred', 'age': 40 };
20 * _.isMatch(object, { 'age': 40 });
23 * _.isMatch(object, { 'age': 36 });
26 function isMatch(object, source) {
27 return object === source || baseIsMatch(object, source, getMatchData(source));
30 module.exports = isMatch;