utils.isEmptyModel.ts Maven / Gradle / Ivy
The newest version!
import isEmpty from 'lodash/isEmpty'
import isNil from 'lodash/isNil'
import every from 'lodash/every'
export function isEmptyModel(model: Record | undefined | object): boolean {
return isEmpty(model) || every(model, value => value === '' || isNil(value))
}