{"ScriptPreparationCode":"function generateUUID() { // Public Domain/MIT\r\n var d = new Date().getTime(); //Timestamp\r\n var d2 = (performance \u0026\u0026 performance.now \u0026\u0026 (performance.now() * 1000)) || 0; //Time in microseconds since page-load or 0 if unsupported\r\n return \u0027xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\u0027.replace(/[xy]/g, function(c) {\r\n var r = Math.random() * 16; //random number between 0 and 16\r\n if (d \u003E 0) { //Use timestamp until depleted\r\n r = (d \u002B r) % 16 | 0;\r\n d = Math.floor(d / 16);\r\n } else { //Use microseconds since page-load if supported\r\n r = (d2 \u002B r) % 16 | 0;\r\n d2 = Math.floor(d2 / 16);\r\n }\r\n return (c === \u0027x\u0027 ? r : (r \u0026 0x3 | 0x8)).toString(16);\r\n });\r\n}\r\n\r\n\r\nfunction uuidv4() {\r\nconst hexDigits = \u00220123456789abcdef\u0022;\r\n\r\n let uuid = \u0022\u0022;\r\n\r\n for (let i = 0; i \u003C 36; i\u002B\u002B) {\r\n if (i === 8 || i === 13 || i === 18 || i === 23) {\r\n uuid \u002B= \u0022-\u0022;\r\n } else if (i === 14) {\r\n uuid \u002B= \u00224\u0022;\r\n } else if (i === 19) {\r\n uuid \u002B= hexDigits[((Math.random() * 4) | 0, 1)];\r\n } else {\r\n uuid \u002B= hexDigits[((Math.random() * 16) | 0, 1)];\r\n }\r\n }\r\n\r\n return uuid;\r\n}","TestCases":[{"Name":"uuidv4","Code":"for (var i=0; i\u003C10000; i\u002B\u002B){\r\n\tuuidv4();\r\n}","IsDeferred":false},{"Name":"generateUUID","Code":"for (var i=0; i\u003C10000; i\u002B\u002B){\r\n\tgenerateUUID();\r\n}","IsDeferred":false}]}