(input: string | null | undefined)
| 3 | // ── Pure function copies (inlined to avoid pulling in server dependencies) ── |
| 4 | |
| 5 | function sanitize(input: string | null | undefined): string | undefined { |
| 6 | if (!input) return undefined; |
| 7 | if (input.length > 50) { |
| 8 | input = input.substring(0, 50); |
| 9 | } |
| 10 | return input |
| 11 | .replace(/[^a-zA-Z0-9-]/g, "-") |
| 12 | .replace(/-+/g, "-") |
| 13 | .replace(/^-|-$/g, ""); |
| 14 | } |
| 15 | |
| 16 | function encodePath(path: string | null | undefined): string { |
| 17 | if (!path) return ""; |
no outgoing calls
no test coverage detected