{"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\n return \u0027xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\u0027.replace(/[xy]/g, function(c) {\r\n const r = Math.random() * 16 | 0,\r\n v = c == \u0027x\u0027 ? r : (r \u0026 0x3 | 0x8);\r\n return v.toString(16);\r\n });\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}]}