mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Bump to v4.0.0.
This commit is contained in:
@@ -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);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user