{"ScriptPreparationCode":"function isNumber(num) {\r\n if (typeof num === \u0027number\u0027) {\r\n return num - num === 0;\r\n }\r\n if (typeof num === \u0027string\u0027 \u0026\u0026 num.trim() !== \u0027\u0027) {\r\n return Number.isFinite ? Number.isFinite(\u002Bnum) : isFinite(\u002Bnum);\r\n }\r\n return false;\r\n};\r\n\r\nvar isOdd = (value) =\u003E {\r\n const n = Math.abs(value);\r\n if (!isNumber(n)) {\r\n throw new TypeError(\u0027expected a number\u0027);\r\n }\r\n if (!Number.isInteger(n)) {\r\n throw new Error(\u0027expected an integer\u0027);\r\n }\r\n if (!Number.isSafeInteger(n)) {\r\n throw new Error(\u0027value exceeds maximum safe integer\u0027);\r\n }\r\n return (n % 2) === 1;\r\n};\r\n\r\nvar isOdd2 = (v) =\u003E ((v | 0) === v \u0026\u0026 v % 2 === 1);\r\n\r\nvar testData = Array.from({length: 40}, () =\u003E Math.floor(Math.random() * 40));","TestCases":[{"Name":"is-odd package","Code":"let odd = 0\r\nfor (const v of testData) {\r\n if (isOdd(v)) odd\u002B\u002B\r\n}","IsDeferred":false},{"Name":"simple function","Code":"let odd = 0\r\nfor (const v of testData) {\r\n if (isOdd2(v)) odd\u002B\u002B\r\n}","IsDeferred":false},{"Name":"manually inlined","Code":"let odd = 0\r\nfor (const v of testData) {\r\n if ((v|0) === v \u0026\u0026 (v%2) === 1) odd\u002B\u002B;\r\n}","IsDeferred":false}]}