🚩 (flags) add username generator

generate username from full name and combine with random string.
This commit is contained in:
2025-10-11 01:34:20 +07:00
parent 15c9599ce7
commit 3d6be163e8
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,7 @@
import { customAlphabet } from "nanoid";
export const generateRandomString = (length: number = 10): string => {
const characters =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
return customAlphabet(characters, length)();
};