What is the most elegant way to determine if all attributes in a javascript object are either null or the empty string? It should work for an arbitrary number of attributes
Building on top of other answers I would use lodash to check isEmpty on the object, as well as its properties.
isEmpty
const isEmpty = (object) => return _.isEmpty(object) || !Object.values(object).some(x => !_.isEmpty(x))