Bump to v4.0.0.

This commit is contained in:
John-David Dalton
2015-08-24 10:34:23 -07:00
parent 4ef16c96e5
commit 0646bacd86
665 changed files with 24828 additions and 19696 deletions

View File

@@ -1,9 +1,8 @@
var baseIsMatch = require('./baseIsMatch'),
getMatchData = require('./getMatchData'),
toObject = require('./toObject');
getMatchData = require('./getMatchData');
/**
* The base implementation of `_.matches` which does not clone `source`.
* The base implementation of `_.matches` which doesn't clone `source`.
*
* @private
* @param {Object} source The object of property values to match.
@@ -19,11 +18,12 @@ function baseMatches(source) {
if (object == null) {
return false;
}
return object[key] === value && (value !== undefined || (key in toObject(object)));
return object[key] === value &&
(value !== undefined || (key in Object(object)));
};
}
return function(object) {
return baseIsMatch(object, matchData);
return object === source || baseIsMatch(object, source, matchData);
};
}