UNPKG

@cosva-lab/form-builder

Version:
17 lines (14 loc) 430 B
'use strict'; var isEmpty = function (value) { if (value === null || value === undefined) 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; }; exports.isEmpty = isEmpty; //# sourceMappingURL=isEmpty.js.map