spotify-manager/utils/generateRandString.ts
Kaushik Narayan R a74ffc453e MASSIVE commit
- moved to typescript

- axios rate limitmodule is busted, removed for now, do something else for that

- sequelize-typescript

- dotenv, not dotenv-flow

- removed playlist details route

types for API

ton of minor fixes and improvements
2025-03-11 15:24:45 -07:00

14 lines
372 B
TypeScript

/**
* Generates a random string containing numbers and letters
*/
export const generateRandString = (length: number): string => {
const possible =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
let text = "";
for (let i = 0; i < length; i++) {
text += possible.charAt(Math.floor(Math.random() * possible.length));
}
return text;
};