MCPcopy Create free account
hub / github.com/Semporia/Scripts / getUUID

Function getUUID

jd_summer_movement.js:596–605  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

594 })
595}
596function getUUID() {
597 var n = (new Date).getTime();
598 let uuid="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"
599 uuid = uuid.replace(/[xy]/g, function (e) {
600 var t = (n + 16 * Math.random()) % 16 | 0;
601 return n = Math.floor(n / 16),
602 ("x" == e ? t : 3 & t | 8).toString(16)
603 }).replace(/-/g, "")
604 return uuid
605}
606/**
607 * 随机从一数组里面取
608 * @param arr

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected