UNPKG

@cosva-lab/form-builder

Version:
11 lines (10 loc) 351 B
//#region src/utils/isEmpty.ts const isEmpty = (value) => { if (value === null || value === void 0) return true; if (typeof value === "string") return value.trim() === ""; if (Array.isArray(value)) return value.length === 0; if (typeof value === "object") return Object.keys(value).length === 0; return false; }; //#endregion export { isEmpty };