(length: number)
| 12 | } |
| 13 | |
| 14 | export function randomString(length: number): string { |
| 15 | const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; |
| 16 | let result = ""; |
| 17 | for (let i = 0; i < length; i++) { |
| 18 | result += characters.charAt(Math.floor(Math.random() * characters.length)); |
| 19 | } |
| 20 | return result; |
| 21 | } |
| 22 | |
| 23 | export function randomPick(options: any[]): any { |
| 24 | return options[Math.floor(Math.random() * options.length)]; |
no outgoing calls
no test coverage detected