{"ScriptPreparationCode":"var namespaces = [];\r\nfor (var i = 0; i \u003C 10000; i\u002B\u002B) {\r\n let predicate = Math.random();\r\n let level = \u0027\u0027;\r\n if (predicate \u003C 0.25) {\r\n level = \u0027:error\u0027;\r\n } else if (predicate \u003C 0.5) {\r\n level = \u0027:warn\u0027;\r\n } else if (predicate \u003C 0.75) {\r\n level = \u0027:verbose\u0027;\r\n }\r\n namespaces.push(\u0060LH:${Math.floor(Math.random() * 1000)}${level}\u0060);\r\n}","TestCases":[{"Name":"VERBOSE (1)","Code":"const level = \u0027LH:*\u0027;\r\nconst rules = level\r\n .replace(/\\s/g, \u0027\u0027)\r\n .replace(/\\*/g, \u0027.\u002B\u0027)\r\n .split(\u0027,\u0027)\r\n .reduce((rules, namespace) =\u003E {\r\n if (!/^-?LH:/.test(namespace)) return rules;\r\n let key = \u0027enabled\u0027;\r\n if (\u0027-\u0027 === namespace[0]) {\r\n key = \u0027disabled\u0027;\r\n namespace = namespace.slice(1);\r\n }\r\n const rule = new RegExp(\u0060^${namespace}$\u0060);\r\n const ruleGroup = rules[key] ?? [];\r\n return { ...rules, [key]: [...ruleGroup, rule] };\r\n }, {});\r\nfor (const ns of namespaces) {\r\n const testRule = (rule) =\u003E rule.test(ns);\r\n const enabled_ = (rules.enabled?.some(testRule) ?? true) \u0026\u0026 !rules.disabled?.some(testRule);\r\n}","IsDeferred":false},{"Name":"VERBOSE (2)","Code":"const level = \u0027LH:*\u0027;\r\nlet enabled_ = false;\r\nconst rules = level\r\n .replace(/\\s/g, \u0027\u0027)\r\n .replace(/\\*/g, \u0027.\u002B\u0027)\r\n .split(\u0027,\u0027)\r\n .reduce((rules, namespace) =\u003E {\r\n if (!/^-?LH:/.test(namespace)) return rules;\r\n let enabled = true;\r\n if (\u0027-\u0027 === namespace[0]) {\r\n namespace = namespace.slice(1);\r\n enabled = false;\r\n }\r\n rules[namespace] = { pattern: new RegExp(\u0060^${namespace}$\u0060), enabled };\r\n return rules;\r\n }, {});\r\nfor (const ns of namespaces) {\r\n for (const key of Object.keys(rules).sort().reverse()) {\r\n if (rules[key].pattern.test(ns)) {\r\n enabled_ = rules[key].enabled;\r\n break;\r\n }\r\n }\r\n}","IsDeferred":false},{"Name":"INFO (1)","Code":"const level = \u0027LH:*, -LH:*:verbose\u0027;\r\nconst rules = level\r\n .replace(/\\s/g, \u0027\u0027)\r\n .replace(/\\*/g, \u0027.\u002B\u0027)\r\n .split(\u0027,\u0027)\r\n .reduce((rules, namespace) =\u003E {\r\n if (!/^-?LH:/.test(namespace)) return rules;\r\n let key = \u0027enabled\u0027;\r\n if (\u0027-\u0027 === namespace[0]) {\r\n key = \u0027disabled\u0027;\r\n namespace = namespace.slice(1);\r\n }\r\n const rule = new RegExp(\u0060^${namespace}$\u0060);\r\n const ruleGroup = rules[key] ?? [];\r\n return { ...rules, [key]: [...ruleGroup, rule] };\r\n }, {});\r\nfor (const ns of namespaces) {\r\n const testRule = (rule) =\u003E rule.test(ns);\r\n const enabled_ = (rules.enabled?.some(testRule) ?? true) \u0026\u0026 !rules.disabled?.some(testRule);\r\n}","IsDeferred":false},{"Name":"INFO (2)","Code":"const level = \u0027LH:*, -LH:*:verbose\u0027;\r\nconst rules = level\r\n .replace(/\\s/g, \u0027\u0027)\r\n .replace(/\\*/g, \u0027.\u002B\u0027)\r\n .split(\u0027,\u0027)\r\n .reduce((rules, namespace) =\u003E {\r\n if (!/^-?LH:/.test(namespace)) return rules;\r\n let enabled = true;\r\n if (\u0027-\u0027 === namespace[0]) {\r\n namespace = namespace.slice(1);\r\n enabled = false;\r\n }\r\n rules[namespace] = { pattern: new RegExp(\u0060^${namespace}$\u0060), enabled };\r\n return rules;\r\n }, {});\r\nfor (const ns of namespaces) {\r\n for (const key of Object.keys(rules).sort().reverse()) {\r\n if (rules[key].pattern.test(ns)) {\r\n enabled_ = rules[key].enabled;\r\n break;\r\n }\r\n }\r\n}","IsDeferred":false},{"Name":"WARN (1)","Code":"const level = \u0027LH:*, LH:*:warn, LH:*:error\u0027;\r\nconst rules = level\r\n .replace(/\\s/g, \u0027\u0027)\r\n .replace(/\\*/g, \u0027.\u002B\u0027)\r\n .split(\u0027,\u0027)\r\n .reduce((rules, namespace) =\u003E {\r\n if (!/^-?LH:/.test(namespace)) return rules;\r\n let key = \u0027enabled\u0027;\r\n if (\u0027-\u0027 === namespace[0]) {\r\n key = \u0027disabled\u0027;\r\n namespace = namespace.slice(1);\r\n }\r\n const rule = new RegExp(\u0060^${namespace}$\u0060);\r\n const ruleGroup = rules[key] ?? [];\r\n return { ...rules, [key]: [...ruleGroup, rule] };\r\n }, {});\r\nfor (const ns of namespaces) {\r\n const testRule = (rule) =\u003E rule.test(ns);\r\n const enabled_ = (rules.enabled?.some(testRule) ?? true) \u0026\u0026 !rules.disabled?.some(testRule);\r\n}","IsDeferred":false},{"Name":"WARN (2)","Code":"const level = \u0027LH:*, LH:*:warn, LH:*:error\u0027;\r\nconst rules = level\r\n .replace(/\\s/g, \u0027\u0027)\r\n .replace(/\\*/g, \u0027.\u002B\u0027)\r\n .split(\u0027,\u0027)\r\n .reduce((rules, namespace) =\u003E {\r\n if (!/^-?LH:/.test(namespace)) return rules;\r\n let enabled = true;\r\n if (\u0027-\u0027 === namespace[0]) {\r\n namespace = namespace.slice(1);\r\n enabled = false;\r\n }\r\n rules[namespace] = { pattern: new RegExp(\u0060^${namespace}$\u0060), enabled };\r\n return rules;\r\n }, {});\r\nfor (const ns of namespaces) {\r\n for (const key of Object.keys(rules).sort().reverse()) {\r\n if (rules[key].pattern.test(ns)) {\r\n enabled_ = rules[key].enabled;\r\n break;\r\n }\r\n }\r\n}","IsDeferred":false},{"Name":"ERROR (1)","Code":"const level = \u0027-LH:*, LH:*:error\u0027;\r\nconst rules = level\r\n .replace(/\\s/g, \u0027\u0027)\r\n .replace(/\\*/g, \u0027.\u002B\u0027)\r\n .split(\u0027,\u0027)\r\n .reduce((rules, namespace) =\u003E {\r\n if (!/^-?LH:/.test(namespace)) return rules;\r\n let key = \u0027enabled\u0027;\r\n if (\u0027-\u0027 === namespace[0]) {\r\n key = \u0027disabled\u0027;\r\n namespace = namespace.slice(1);\r\n }\r\n const rule = new RegExp(\u0060^${namespace}$\u0060);\r\n const ruleGroup = rules[key] ?? [];\r\n return { ...rules, [key]: [...ruleGroup, rule] };\r\n }, {});\r\nfor (const ns of namespaces) {\r\n const testRule = (rule) =\u003E rule.test(ns);\r\n const enabled_ = (rules.enabled?.some(testRule) ?? true) \u0026\u0026 !rules.disabled?.some(testRule);\r\n}","IsDeferred":false},{"Name":"ERROR (2)","Code":"const level = \u0027-LH:*, LH:*:error\u0027;\r\nconst rules = level\r\n .replace(/\\s/g, \u0027\u0027)\r\n .replace(/\\*/g, \u0027.\u002B\u0027)\r\n .split(\u0027,\u0027)\r\n .reduce((rules, namespace) =\u003E {\r\n if (!/^-?LH:/.test(namespace)) return rules;\r\n let enabled = true;\r\n if (\u0027-\u0027 === namespace[0]) {\r\n namespace = namespace.slice(1);\r\n enabled = false;\r\n }\r\n rules[namespace] = { pattern: new RegExp(\u0060^${namespace}$\u0060), enabled };\r\n return rules;\r\n }, {});\r\nfor (const ns of namespaces) {\r\n for (const key of Object.keys(rules).sort().reverse()) {\r\n if (rules[key].pattern.test(ns)) {\r\n enabled_ = rules[key].enabled;\r\n break;\r\n }\r\n }\r\n}","IsDeferred":false},{"Name":"SILENT (1)","Code":"const level = \u0027-LH:*\u0027;\r\nconst rules = level\r\n .replace(/\\s/g, \u0027\u0027)\r\n .replace(/\\*/g, \u0027.\u002B\u0027)\r\n .split(\u0027,\u0027)\r\n .reduce((rules, namespace) =\u003E {\r\n if (!/^-?LH:/.test(namespace)) return rules;\r\n let key = \u0027enabled\u0027;\r\n if (\u0027-\u0027 === namespace[0]) {\r\n key = \u0027disabled\u0027;\r\n namespace = namespace.slice(1);\r\n }\r\n const rule = new RegExp(\u0060^${namespace}$\u0060);\r\n const ruleGroup = rules[key] ?? [];\r\n return { ...rules, [key]: [...ruleGroup, rule] };\r\n }, {});\r\nfor (const ns of namespaces) {\r\n const testRule = (rule) =\u003E rule.test(ns);\r\n const enabled_ = (rules.enabled?.some(testRule) ?? true) \u0026\u0026 !rules.disabled?.some(testRule);\r\n}","IsDeferred":false},{"Name":"SILENT (2)","Code":"const level = \u0027-LH:*\u0027;\r\nconst rules = level\r\n .replace(/\\s/g, \u0027\u0027)\r\n .replace(/\\*/g, \u0027.\u002B\u0027)\r\n .split(\u0027,\u0027)\r\n .reduce((rules, namespace) =\u003E {\r\n if (!/^-?LH:/.test(namespace)) return rules;\r\n let enabled = true;\r\n if (\u0027-\u0027 === namespace[0]) {\r\n namespace = namespace.slice(1);\r\n enabled = false;\r\n }\r\n rules[namespace] = { pattern: new RegExp(\u0060^${namespace}$\u0060), enabled };\r\n return rules;\r\n }, {});\r\nfor (const ns of namespaces) {\r\n for (const key of Object.keys(rules).sort().reverse()) {\r\n if (rules[key].pattern.test(ns)) {\r\n enabled_ = rules[key].enabled;\r\n break;\r\n }\r\n }\r\n}","IsDeferred":false}]}