MCPcopy Create free account
hub / github.com/QLHazyCoder/FlowPilot / buildDraftAccountName

Function buildDraftAccountName

content/sub2api-panel.js:191–199  ·  view source on GitHub ↗
(groupName)

Source from the content-addressed store, hash-verified

189}
190
191function buildDraftAccountName(groupName) {
192 const prefix = (groupName || SUB2API_DEFAULT_GROUP_NAME)
193 .trim()
194 .replace(/[^\w\u4e00-\u9fa5-]+/g, '-')
195 .replace(/^-+|-+$/g, '') || SUB2API_DEFAULT_GROUP_NAME;
196 const stamp = new Date().toISOString().replace(/\D/g, '').slice(2, 14);
197 const random = Math.floor(Math.random() * 9000 + 1000);
198 return `${prefix}-${stamp}-${random}`;
199}
200
201function extractStateFromAuthUrl(authUrl) {
202 try {

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected