perf(lib): hoist customAlphabet factory in generateId (#1204)

This commit is contained in:
Bharath 2026-07-11 07:45:21 +05:30 committed by GitHub
parent d77b6eb6d9
commit 09e3b78fc2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,7 @@
import { customAlphabet } from "nanoid"
export const generateId = () =>
customAlphabet("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")(
22,
)
const generate = customAlphabet(
"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",
)
export const generateId = () => generate(22)