{"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 ([1e7] \u002B -1e3 \u002B -4e3 \u002B -8e3 \u002B -1e11).replace(/[018]/g, c =\u003E\r\n (c ^ crypto.getRandomValues(new Uint8Array(1))[0] \u0026 15 \u003E\u003E c / 4).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}]}