{"ScriptPreparationCode":"var DATA = (function (K, N, total) {\r\n function random(n) {\r\n return Math.floor(Math.random() * 7);\r\n }\r\n\r\n function randomKey() {\r\n return Math.random().toString(36).slice(2);\r\n }\r\n\r\n function randomCollection(count = random(N)) {\r\n for (var a = new Array(count), i = 0; i \u003C count; i\u002B\u002B) {\r\n a[i] = randomValue();\r\n }\r\n\r\n return a;\r\n }\r\n\r\n function randomObject(keysCount = random(N)) {\r\n for (var obj = {}, i = 0; i \u003C keysCount; i\u002B\u002B) {\r\n obj[randomKey()] = randomValue();\r\n }\r\n\r\n return obj;\r\n }\r\n\r\n function randomValue(type = random(K)) {\r\n switch (type % K) {\r\n case 0: return undefined;\r\n case 1: return null; break;\r\n case 2: return String(Math.random());\r\n case 3: return Math.random() \u003E 0.5;\r\n case 4: return Math.random() * 1E3;\r\n case 5: return randomCollection();\r\n default: return randomObject();\r\n }\r\n }\r\n\r\n return randomCollection(total);\r\n}(7, 5, 1E6));\r\n\r\n\r\nfunction canBeAddedToWeakSet_switch2(value) {\r\n switch (typeof value) {\r\n case \u0027undefined\u0027:\r\n return String(value) === \u0027[object HTMLAllCollection]\u0027\r\n case \u0027boolean\u0027:\r\n case \u0027number\u0027:\r\n case \u0027string\u0027:\r\n case \u0027symbol\u0027:\r\n return false\r\n case \u0027object\u0027:\r\n return value !== null\r\n default:\r\n return true\r\n }\r\n}\r\n\r\nfunction canBeAddedToWeakSet_null_typeof_x2(value) {\r\n return value !== null \u0026\u0026 (typeof value === \u0027object\u0027 || typeof value === \u0027function\u0027);\r\n}\r\n\r\nfunction test(canAdd) {\r\n const count = DATA.reduce((countOfAddables, value) =\u003E (canAdd(value) ? 1 : 0) \u002B countOfAddables, 0);\r\n \tconsole.log(\u0027can add %d out of %d values in the array\u0027, count, DATA.length);\r\n}","TestCases":[{"Name":"Switch-Case 2","Code":"test(canBeAddedToWeakSet_switch2);","IsDeferred":false},{"Name":"!== null \u0026\u0026 (typeof || typeof)","Code":"test(canBeAddedToWeakSet_null_typeof_x2);","IsDeferred":false}]}