(groupName)
| 189 | } |
| 190 | |
| 191 | function 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 | |
| 201 | function extractStateFromAuthUrl(authUrl) { |
| 202 | try { |
no outgoing calls
no test coverage detected