(pathname: string)
| 195 | } |
| 196 | |
| 197 | export function strip(pathname: string) { |
| 198 | const locale = fromPathname(pathname) |
| 199 | if (!locale) return fix(pathname) |
| 200 | |
| 201 | const next = fix(pathname).slice(locale.length + 1) |
| 202 | if (!next) return "/" |
| 203 | if (next.startsWith("/")) return next |
| 204 | return `/${next}` |
| 205 | } |
| 206 | |
| 207 | export function route(locale: Locale, pathname: string) { |
| 208 | const next = strip(pathname) |
no test coverage detected