feat(base): add prefixed nanoid id schemas and generators

This commit is contained in:
Philipinho
2026-06-19 22:33:21 +01:00
parent e717371368
commit f68c59dfcb
2 changed files with 7 additions and 2 deletions
@@ -5,4 +5,9 @@ export const nanoIdGen = customAlphabet(alphabet, 10);
const slugIdAlphabet =
'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
export const generateSlugId = customAlphabet(slugIdAlphabet, 10);
export const generateSlugId = customAlphabet(slugIdAlphabet, 10);
const baseIdSuffix = customAlphabet(alphabet, 9);
export const generateBasePropertyId = (): string => `prp${baseIdSuffix()}`;
export const generateBaseChoiceId = (): string => `opt${baseIdSuffix()}`;