(input: string)
| 4 | * strings that are safe to use as TypeScript/tool-name prefixes. |
| 5 | */ |
| 6 | export function slugifyNamespace(input: string): string { |
| 7 | return input |
| 8 | .trim() |
| 9 | .toLowerCase() |
| 10 | .replace(/[^a-z0-9_]+/g, "_") |
| 11 | .replace(/^_+|_+$/g, ""); |
| 12 | } |
| 13 | |
| 14 | /** |
| 15 | * Sanitizes namespace input as the user types without removing intentional |
no test coverage detected