{"ScriptPreparationCode":"/*your preparation JavaScript code goes here\r\nTo execute async code during the script preparation, wrap it as function globalMeasureThatScriptPrepareFunction, example:*/\r\nasync function globalMeasureThatScriptPrepareFunction() {\r\n // This function is optional, feel free to remove it.\r\n // await someThing();\r\n}","TestCases":[{"Name":"Reduce","Code":"const classes = (...classNames) =\u003E classNames.reduce((res, className) =\u003E (className ? \u0060${res} ${className}\u0060 : res), \u0027\u0027);\r\nfor (let i = 0; i\u003C100; i\u002B\u002B){\r\n const test1 = classes(\u0027hello bla blub\u0027, 1 === 2 \u0026\u0026 \u0027nope\u0027, undefined, true \u0026\u0026 \u0027this goes in\u0027, \u0022false\u0022===false \u0026\u0026 \u0022get out\u0022, \u0022another class\u0022, \u0022another string\u0022);\r\n}","IsDeferred":false},{"Name":"Filter and join","Code":"const classes = (...classNames) =\u003E classNames.filter(Boolean).join(\u0027 \u0027);\r\nfor (let i = 0; i\u003C100; i\u002B\u002B){\r\n const test1 = classes(\u0027hello bla blub\u0027, 1 === 2 \u0026\u0026 \u0027nope\u0027, undefined, true \u0026\u0026 \u0027this goes in\u0027, \u0022false\u0022===false \u0026\u0026 \u0022get out\u0022, \u0022another class\u0022, \u0022another string\u0022);\r\n}","IsDeferred":false},{"Name":"Join and replace false","Code":"const classes = (...classNames) =\u003E classNames.join(\u0027 \u0027).replace(\u0027false\u0027, \u0027\u0027);\r\nfor (let i = 0; i\u003C100; i\u002B\u002B){\r\n const test1 = classes(\u0027hello bla blub\u0027, 1 === 2 \u0026\u0026 \u0027nope\u0027, undefined, true \u0026\u0026 \u0027this goes in\u0027, \u0022false\u0022===false \u0026\u0026 \u0022get out\u0022, \u0022another class\u0022, \u0022another string\u0022);\r\n}","IsDeferred":false},{"Name":"Join only valid strings","Code":"const classes = (...classNames) =\u003E classNames.join(\u0027 \u0027);\r\nfor (let i = 0; i\u003C100; i\u002B\u002B){\r\n const test1 = classes(\u0027hello bla blub\u0027, 1 === 2 ? \u0027nope\u0027 : null, undefined, true ? \u0027this goes in\u0027 : null, \u0022false\u0022===false ? \u0022get out\u0022 : null, \u0022another class\u0022, \u0022another string\u0022);\r\n}","IsDeferred":false},{"Name":"Reduce but no template string","Code":"const classes = (...classNames) =\u003E classNames.reduce((res, className) =\u003E (className ? res \u002B \u0022 \u0022 \u002B className : res), \u0027\u0027);\r\nfor (let i = 0; i\u003C100; i\u002B\u002B){\r\n const test1 = classes(\u0027hello bla blub\u0027, 1 === 2 \u0026\u0026 \u0027nope\u0027, undefined, true \u0026\u0026 \u0027this goes in\u0027, \u0022false\u0022===false \u0026\u0026 \u0022get out\u0022, \u0022another class\u0022, \u0022another string\u0022);\r\n}","IsDeferred":false},{"Name":"Reduce but with optimized parameters","Code":"const classes = (...classNames) =\u003E classNames.reduce((res, className) =\u003E (className ? \u0060${res} ${className}\u0060 : res), \u0027\u0027);\r\nfor (let i = 0; i\u003C100; i\u002B\u002B){\r\n const test1 = classes(\u0027hello bla blub another class another string\u0027, 1 === 2 \u0026\u0026 \u0027nope\u0027, true \u0026\u0026 \u0027this goes in\u0027, \u0022false\u0022===false \u0026\u0026 \u0022get out\u0022);\r\n}","IsDeferred":false},{"Name":"Push valid to array and join","Code":"const classes = (...classNames) =\u003E {\r\n const res = [];\r\n classNames.forEach((cn) =\u003E {\r\n if (cn){\r\n res.push(cn);\r\n }\r\n })\r\n return res.join(\u0022 \u0022);\r\n}\r\nfor (let i = 0; i\u003C100; i\u002B\u002B){\r\n const test1 = classes(\u0027hello bla blub\u0027, 1 === 2 \u0026\u0026 \u0027nope\u0027, undefined, true \u0026\u0026 \u0027this goes in\u0027, \u0022false\u0022===false \u0026\u0026 \u0022get out\u0022, \u0022another class\u0022, \u0022another string\u0022);\r\n}","IsDeferred":false},{"Name":"Filter and reduce","Code":"const classes = (...classNames) =\u003E classNames.filter(Boolean).reduce((res, className) =\u003E \u0060${res} ${className}\u0060, \u0027\u0027);\r\nfor (let i = 0; i\u003C100; i\u002B\u002B){\r\n const test1 = classes(\u0027hello bla blub\u0027, 1 === 2 \u0026\u0026 \u0027nope\u0027, undefined, true \u0026\u0026 \u0027this goes in\u0027, \u0022false\u0022===false \u0026\u0026 \u0022get out\u0022, \u0022another class\u0022, \u0022another string\u0022);\r\n}","IsDeferred":false},{"Name":"Reduce but no leading space","Code":"const classes = (...classNames) =\u003E classNames.reduce((res, className) =\u003E (className ? \u0060${res}${res?\u0022 \u0022:\u0022\u0022}${className}\u0060 : res), \u0027\u0027);\r\nfor (let i = 0; i\u003C100; i\u002B\u002B){\r\n const test1 = classes(\u0027hello bla blub\u0027, 1 === 2 \u0026\u0026 \u0027nope\u0027, undefined, true \u0026\u0026 \u0027this goes in\u0027, \u0022false\u0022===false \u0026\u0026 \u0022get out\u0022, \u0022another class\u0022, \u0022another string\u0022);\r\n}","IsDeferred":false},{"Name":"Reduce but no leading space 2","Code":"const classes = (...classNames) =\u003E classNames.reduceRight((res, className) =\u003E (className ? \u0060${className} ${res}\u0060 : res), \u0027\u0027);\r\nfor (let i = 0; i\u003C100; i\u002B\u002B){\r\n const test1 = classes(\u0027hello bla blub\u0027, 1 === 2 \u0026\u0026 \u0027nope\u0027, undefined, true \u0026\u0026 \u0027this goes in\u0027, \u0022false\u0022===false \u0026\u0026 \u0022get out\u0022, \u0022another class\u0022, \u0022another string\u0022);\r\n}","IsDeferred":false}]}