mirror of
https://github.com/docmost/docmost.git
synced 2026-06-22 12:01:39 +10:00
feat(base): add prefixed nanoid id schemas and generators
This commit is contained in:
@@ -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()}`;
|
||||
|
||||
+1
-1
Submodule apps/server/src/ee updated: 3587fa638b...52a53ac537
Reference in New Issue
Block a user