♻️ Move nanoid to utils package (#1430)

This commit is contained in:
Luke Vella 2024-11-08 17:50:07 +00:00 committed by GitHub
parent d55131c2ab
commit 0fc7d0a0c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 371 additions and 439 deletions

View file

@ -0,0 +1,13 @@
import { customAlphabet } from "nanoid";
export const nanoid = customAlphabet(
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
12,
);
export const randomid = customAlphabet(
"0123456789abcdefghijklmnopqrstuvwxyz",
12,
);
export const generateOtp = customAlphabet("0123456789", 6);