mirror of
https://github.com/SrIzan10/hctv.git
synced 2026-06-28 03:12:22 +00:00
8 lines
285 B
TypeScript
8 lines
285 B
TypeScript
export function randomString(length: number): string {
|
|
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
let result = '';
|
|
for (let i = 0; i < length; i++) {
|
|
result += chars.charAt(Math.floor(Math.random() * chars.length));
|
|
}
|
|
return result;
|
|
} |