You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
import hasOwnProp from './has-own-prop';
|
|
|
|
export default function isObjectEmpty(obj) {
|
|
if (Object.getOwnPropertyNames) {
|
|
return Object.getOwnPropertyNames(obj).length === 0;
|
|
} else {
|
|
var k;
|
|
for (k in obj) {
|
|
if (hasOwnProp(obj, k)) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
}
|