1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-21 22:09:36 +02:00
AdventureLog/src/lib/index.ts

11 lines
412 B
TypeScript
Raw Normal View History

2024-03-29 21:41:22 +00:00
// place files you want to import through the `$lib` alias in this folder.
export function generateRandomString() {
let randomString = '';
const digits = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
for (let i = 0; i < 10; i++) {
const randomIndex = Math.floor(Math.random() * digits.length);
randomString += digits[randomIndex];
}
return randomString;
}