| 1 | export function decodePath(path: string) { |
| 2 | return path |
| 3 | .split("/") |
| 4 | .map((segment) => decodeURIComponent(segment)) |
| 5 | .join("/"); |
| 6 | } |
| 7 | |
| 8 | |
| 9 | export function encodePath(path: string) { |
| 10 | return path |
| 11 | .split("/") |
| 12 | .map((segment) => encodeURIComponent(segment)) |
| 13 | .join("/"); |
| 14 | } |