Проверка на пустоту объекта #js #tools
if (Object.keys(obj).length == 0) { console.log('empty object'); }