(token: string)
| 68 | return `${token.slice(0, 4)}***${token.slice(-4)}`; |
| 69 | } |
| 70 | |
| 71 | function formatDuration(ms: number): string { |
| 72 | const totalSeconds = Math.max(0, Math.round(ms / 1000)); |
| 73 | const minutes = Math.floor(totalSeconds / 60); |
| 74 | const seconds = totalSeconds % 60; |
| 75 | if (minutes <= 0) return `${seconds}秒`; |
| 76 | return `${minutes}分${seconds}秒`; |
| 77 | } |
no test coverage detected