{"ScriptPreparationCode":"var list = [...Array(10000).keys()].map((index) =\u003E \u0060ITEM_${index}\u0060);\r\nvar val = \u0027ITEM_100\u0027;","TestCases":[{"Name":"Regex case","Code":"const trimVal = val.trim();\r\nconst regex = new RegExp(\u0060^${trimVal}\u0060, \u0027i\u0027);\r\n\r\nconst x = list.filter((item) =\u003E {\r\n return trimVal !== \u0027\u0027 ? regex.test(item) : true;\r\n});\r\n","IsDeferred":false},{"Name":"Indexof no trime, begins with","Code":"const lowerVal = val.toLowerCase();\r\nconst x = list.filter((item) =\u003E {\r\n return val !== \u0027\u0027 ? item.toLowerCase().indexOf(lowerVal) === 0: true;\r\n});\r\n","IsDeferred":false},{"Name":"Indexof trim, begins with","Code":"const trimVal = val.trim().toLowerCase();\r\nconst x = list.filter((item) =\u003E {\r\n return trimVal !== \u0027\u0027 ? item.toLowerCase().indexOf(trimVal) === 0 : true;\r\n});\r\n","IsDeferred":false}]}