In order to determine whether an object is empty, we use Object.keys() along with the length method and do the following:

const a = {};

console.log(Object.keys(a).length); //0