(segments: string[])
| 3 | |
| 4 | /** Join the non empty segments with "/". */ |
| 5 | export const generatePath = (segments: string[]): string => { |
| 6 | const path = segments.filter((s) => s.length > 0).join('/'); |
| 7 | |
| 8 | return '/' + path; |
| 9 | }; |
| 10 | |
| 11 | const generateUrl = (segments: string[], useHash: boolean, queryString?: string, fragment?: string) => { |
| 12 | let url = generatePath(segments); |
no outgoing calls