Bump to v4.0.0.

This commit is contained in:
John-David Dalton
2015-09-17 17:52:09 -07:00
parent 1d77dfa4b7
commit 54e7baecc3
675 changed files with 11257 additions and 8085 deletions

View File

@@ -1,9 +1,8 @@
import baseIsMatch from './baseIsMatch';
import getMatchData from './getMatchData';
import toObject from './toObject';
/**
* 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);
};
}