if object.key has empty value code example
Example 1: js check if object is empty
> !!Object.keys(obj).length;
Example 2: check undefined object javascript one liner set to emtpy
const isEmpty = Object.values(object).every(x => (x === null || x === ''));