(length: number)
| 37 | } |
| 38 | |
| 39 | function generateRandomPassword(length: number): string { |
| 40 | const charset = |
| 41 | "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+"; |
| 42 | let password = ""; |
| 43 | for (let i = 0; i < length; i++) { |
| 44 | const randomIndex = Math.floor(Math.random() * charset.length); |
| 45 | password += charset[randomIndex]; |
| 46 | } |
| 47 | return password; |
| 48 | } |
| 49 | |
| 50 | async function tracking(event: string, properties: any) { |
| 51 | const client = track(); |