@aplus-frontend/ui
Version:
2 lines (1 loc) • 536 B
JavaScript
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function n(){const t=new Uint8Array(16);if(typeof crypto<"u"&&crypto.getRandomValues)crypto.getRandomValues(t);else for(let r=0;r<t.length;r++)t[r]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;const e=Array.from(t).map(r=>r.toString(16).padStart(2,"0")).join("");return[e.substr(0,8),e.substr(8,4),"4"+e.substr(13,3),(parseInt(e.substr(16,2),16)&63|128).toString(16)+e.substr(18,2),e.substr(20,12)].join("-")}exports.generateUniqueKey=n;
;