{"ScriptPreparationCode":"const mt = new MersenneTwister();\r\nconst randomInt = (max, min) =\u003E {\r\n const _max = max ?? 32768;\r\n const _min = min ?? 0;\r\n return mt.rnd() * (_max - _min) \u002B _min;\r\n};\r\nconst randomNumber = ({\r\n min: _min,\r\n max: _max,\r\n precision: _precision,\r\n}) =\u003E {\r\n const min = _min || 0;\r\n let max = _max || 99999;\r\n const precision = _precision || 1;\r\n if (max \u003E= 0) {\r\n max \u002B= precision;\r\n }\r\n\r\n let randomNumber = Math.floor(randomInt(max / precision, min / precision));\r\n randomNumber /= 1 / precision;\r\n\r\n return randomNumber;\r\n};\r\n\r\n// tests\r\nwindow.testLodash = () =\u003E {\r\n for (let i = 0; i \u003C 5000; i\u002B\u002B) {\r\n _.random(0, i);\r\n }\r\n}\r\n\r\nwindow.testFakerFork = () =\u003E {\r\n for (let i = 0; i \u003C 5000; i\u002B\u002B) {\r\n randomNumber({\r\n min: 0,\r\n max: i\r\n });\r\n }\r\n}","TestCases":[{"Name":"_.random","Code":"window.testLodash()","IsDeferred":false},{"Name":"randomNumber","Code":"window.testFakerFork()","IsDeferred":false}]}