{"ScriptPreparationCode":null,"TestCases":[{"Name":"for loop","Code":"const isEmpty = value =\u003E {\r\n if (!value \u0026\u0026 value !== 0 \u0026\u0026 value !== false) {\r\n return true;\r\n }\r\n else if (Array.isArray(value)) {\r\n for (let i = 0; i \u003C value.length; i\u002B\u002B) {\r\n if (!isEmpty(value[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n else if (typeof value === \u0027object\u0027) {\r\n for (let prop in value) {\r\n if (value.hasOwnProperty(prop) \u0026\u0026 !isEmpty(value[prop])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n return false;\r\n};\r\nisEmpty({arr:[0, null, null, null], ai:\u0027\u0027, io:{arr:[null, null, null, null, 1]}});","IsDeferred":false},{"Name":"every","Code":"const isEmpty2 = value =\u003E {\r\n if (!value \u0026\u0026 value !== 0 \u0026\u0026 value !== false) {\r\n return true;\r\n }\r\n if (Array.isArray(value)) {\r\n return value.every(isEmpty2); \r\n }\r\n if (typeof value === \u0027object\u0027) {\r\n return Object.values(value).every(isEmpty2);\r\n }\r\n return false;\r\n};\r\nisEmpty2({arr:[0, null, null, null], ai:\u0027\u0027, io:{arr:[null, null, null, null, 1]}});","IsDeferred":false}]}