(token = "")
| 46 | } |
| 47 | |
| 48 | function maskToken(token = "") { |
| 49 | if (!token) return ""; |
| 50 | return token.length > 16 ? `${token.slice(0, 8)}***${token.slice(-8)}` : `${token.slice(0, 4)}***`; |
| 51 | } |
| 52 | |
| 53 | function randomString(length) { |
| 54 | const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; |
no outgoing calls
no test coverage detected