Simplify _.isEmpty.

This commit is contained in:
John-David Dalton
2016-08-03 21:42:28 -07:00
parent d7951db01b
commit 02e9f4c333

View File

@@ -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);
}
/**