mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Simplify _.isEmpty.
This commit is contained in:
@@ -11046,12 +11046,14 @@
|
||||
return !value.size;
|
||||
}
|
||||
}
|
||||
var isProto = isPrototype(value);
|
||||
for (var key in value) {
|
||||
if (hasOwnProperty.call(value, key)) {
|
||||
if (hasOwnProperty.call(value, key) &&
|
||||
!(isProto && key == 'constructor')) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return !(nonEnumShadows && keys(value).length);
|
||||
return !(nonEnumShadows && baseKeys(value).length);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user