function isObjectEmpty(obj) { return Object.keys(obj).length === 0; }
function isEmptyObject(obj) { return !Object.keys(obj).length; }
> !!Object.keys(obj).length;
JSON.stringify({}) !== '{}';