mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
Bump to v4.14.0.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import baseConformsTo from './_baseConformsTo.js';
|
||||
import keys from './keys.js';
|
||||
|
||||
/**
|
||||
@@ -8,25 +9,9 @@ import keys from './keys.js';
|
||||
* @returns {Function} Returns the new spec function.
|
||||
*/
|
||||
function baseConforms(source) {
|
||||
var props = keys(source),
|
||||
length = props.length;
|
||||
|
||||
var props = keys(source);
|
||||
return function(object) {
|
||||
if (object == null) {
|
||||
return !length;
|
||||
}
|
||||
var index = length;
|
||||
while (index--) {
|
||||
var key = props[index],
|
||||
predicate = source[key],
|
||||
value = object[key];
|
||||
|
||||
if ((value === undefined &&
|
||||
!(key in Object(object))) || !predicate(value)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return baseConformsTo(object, source, props);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user