{"ScriptPreparationCode":"var el = document.createElement(\u0027div\u0027);\r\nel.className = \u0027foo bar baz hello world\u0027;\r\nvar x = \u0027hello\u0027;\r\nvar re = new RegExp(\u0027\\\\b\u0027 \u002B x \u002B \u0027\\\\b\u0027);\r\nvar cache = new Map();","TestCases":[{"Name":"className const regex","Code":"re.test(el.className);","IsDeferred":false},{"Name":"className cached regex","Code":"re = cache.get(x);\r\nif (!re) {\r\n re = new RegExp(\u0027\\\\b\u0027 \u002B x \u002B \u0027\\\\b\u0027);\r\n cache.set(x, re);\r\n}\r\nre.test(el.className);\r\n","IsDeferred":false},{"Name":"className new regex","Code":"new RegExp(\u0027\\\\b\u0027 \u002B x \u002B \u0027\\\\b\u0027).test(el.className);\r\n","IsDeferred":false},{"Name":"classList contains","Code":"el.classList.contains(x);","IsDeferred":false},{"Name":"className split includes","Code":"el.className.split(\u0027 \u0027).includes(x);","IsDeferred":false}]}