blob: ab2bb1cf0fda399785c520d858b9b8cc0b1cc260 (
plain)
1
2
3
4
5
6
7
|
export const encodePath = (path: string): string =>
path
.split('/')
.filter((k: string) => k)
.join('%2F') // encode the '/' char for the url
export const decodePath = (path: string): string => `/${path}`
|