MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / generateUUID

Method generateUUID

jlyh.js:74–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72
73 // UUID生成
74 generateUUID() {
75 const alphanumeric = "0123456789abcdef";
76 const sections = [8, 4, 4, 4, 12];
77 let uuid = "";
78 for (let i = 0; i < sections.length; i++) {
79 for (let j = 0; j < sections[i]; j++) {
80 uuid += alphanumeric[Math.floor(Math.random() * alphanumeric.length)];
81 }
82 if (i !== sections.length - 1) {
83 uuid += "-";
84 }
85 }
86 return uuid;
87 }
88
89 // Post请求构建
90 getPostHeader(key, path, body) {

Callers 2

getPostHeaderMethod · 0.95
getGetHeaderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected