(length = 11)
| 18 | } |
| 19 | |
| 20 | export function randomShortUUID(length = 11) { |
| 21 | const asciiLowercase = 'abcdefghijklmnopqrstuvwxyz'; |
| 22 | const asciiUppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; |
| 23 | const digits = '0123456789'; |
| 24 | const allChars = asciiLowercase + asciiUppercase + digits + '_-'; |
| 25 | let result = ''; |
| 26 | for (let i = 0; i < length; i++) { |
| 27 | result += allChars.charAt(Math.floor(Math.random() * allChars.length)); |
| 28 | } |
| 29 | return result; |
| 30 | } |
| 31 | |
| 32 | export function secondsToHHMMSS(secs) { |
| 33 | if (!secs) { |
no outgoing calls
no test coverage detected