1
0
Fork 0
mirror of https://github.com/lukevella/rallly.git synced 2025-07-10 13:07:28 +02:00
rallly/packages/backend/utils/nanoid.ts
2023-04-03 18:46:25 +01:00

13 lines
310 B
TypeScript

import { customAlphabet } from "nanoid";
export const nanoid = customAlphabet(
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
12,
);
export const randomid = customAlphabet(
"0123456789abcdefghijklmnopqrstuvwxyz",
12,
);
export const generateOtp = customAlphabet("0123456789", 6);