(value: string)
| 105 | } |
| 106 | |
| 107 | export function normalizeCodexName(value: string): string { |
| 108 | const trimmed = value.trim() |
| 109 | if (!trimmed) return "item" |
| 110 | const normalized = trimmed |
| 111 | .toLowerCase() |
| 112 | .replace(/[\\/]+/g, "-") |
| 113 | .replace(/[:\s]+/g, "-") |
| 114 | .replace(/[^a-z0-9_-]+/g, "-") |
| 115 | .replace(/-+/g, "-") |
| 116 | .replace(/^-+|-+$/g, "") |
| 117 | return normalized || "item" |
| 118 | } |
no outgoing calls
no test coverage detected