* Join two path segments, ensuring that there is exactly one slash (`/`) between them.
(path1: string, path2: string)
| 304 | * Join two path segments, ensuring that there is exactly one slash (`/`) between them. |
| 305 | */ |
| 306 | function joinPaths(path1: string, path2: string): string { |
| 307 | return `${path1.replace(/\/$/, '')}/${path2.replace(/^\//, '')}`; |
| 308 | } |
no test coverage detected
searching dependent graphs…