(...paths)
| 46 | } |
| 47 | |
| 48 | export function pathJoin(...paths) { |
| 49 | let newPath = paths.map(cleanSlashes).join('/') |
| 50 | if (!newPath || newPath === '/') { |
| 51 | return '/' |
| 52 | } |
| 53 | |
| 54 | newPath = cleanSlashes(newPath) |
| 55 | if (newPath.includes('?')) { |
| 56 | newPath = newPath.substring(0, newPath.indexOf('?')) |
| 57 | } |
| 58 | return newPath |
| 59 | } |
| 60 | |
| 61 | // This function is for extracting a routePath from a path or string |
| 62 | // RoutePaths do not have query params, basePaths, and should |
no test coverage detected
searching dependent graphs…