Generates a random alphanumeric string of a specified length.
13 weeks ago
function generateRandomString(length: number): string {
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
return Array.from({ length }, () =>
chars.charAt(Math.floor(Math.random() * chars.length))
).join("");
}