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