(taken: ReadonlySet<string>)
| 118 | const shortId = (): string => Math.random().toString(36).slice(2, 8); |
| 119 | |
| 120 | export const freshCustomAuthSlug = (taken: ReadonlySet<string>): string => { |
| 121 | let candidate = `custom_${shortId()}`; |
| 122 | while (taken.has(candidate)) candidate = `custom_${shortId()}`; |
| 123 | return candidate; |
| 124 | }; |
| 125 | |
| 126 | export const mergeAuthTemplates = <T extends { readonly slug: string }>( |
| 127 | existing: readonly T[], |
no test coverage detected