JavaScript verifique se o objeto está vazio
function isObjectEmpty(obj) {
return Object.keys(obj).length === 0;
}
Grepper
function isObjectEmpty(obj) {
return Object.keys(obj).length === 0;
}
function isEmptyObject(obj) {
return !Object.keys(obj).length;
}
Object.entries(obj).length === 0 && obj.constructor === Object