(length = 20)
| 24 | const chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; |
| 25 | |
| 26 | export function generateRandomString(length = 20): string { |
| 27 | let randomString = ''; |
| 28 | const size = chars.length; |
| 29 | for (let i = 0; i < length; i++) { |
| 30 | const randomNumber = Math.floor(Math.random() * size); |
| 31 | randomString += chars[randomNumber]; |
| 32 | } |
| 33 | return randomString; |
| 34 | } |
| 35 | |
| 36 | export const MAX_NAME_STRING_LENGTH = 100; |
| 37 |
no outgoing calls
no test coverage detected