diff --git a/client/core/src/lib/fullEmpty.js b/client/core/src/lib/fullEmpty.js new file mode 100644 index 000000000..64d82cdad --- /dev/null +++ b/client/core/src/lib/fullEmpty.js @@ -0,0 +1,9 @@ +import {module} from '../module'; + +const isFullEmpty = item => { + return (!item && item !== 0) || (typeof item === 'object' && !Object.keys(item).length); +}; + +export default isFullEmpty; +export const NAME = 'isFullEmpty'; +module.value(NAME, isFullEmpty);