feat: introduce CustomAutocomplete with variables
This commit is contained in:
16
packages/web/src/helpers/isEmpty.ts
Normal file
16
packages/web/src/helpers/isEmpty.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import lodashIsEmpty from 'lodash/isEmpty';
|
||||
|
||||
export default function isEmpty(value: any) {
|
||||
if (value === undefined && value === null) return true;
|
||||
|
||||
if (Array.isArray(value) || typeof value === 'string') {
|
||||
return value.length === 0;
|
||||
}
|
||||
|
||||
if (!Number.isNaN(value)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// covers objects and anything else possibly
|
||||
return lodashIsEmpty(value);
|
||||
};
|
Reference in New Issue
Block a user