* Join two path segments, ensuring that there is exactly one slash (`/`) between them.
(path1: string, path2: string)
| 299 | * Join two path segments, ensuring that there is exactly one slash (`/`) between them. |
| 300 | */ |
| 301 | function joinPaths(path1: string, path2: string): string { |
| 302 | return `${path1.replace(/\/$/, '')}/${path2.replace(/^\//, '')}`; |
| 303 | } |
no test coverage detected