(base, maybePath)
| 56 | } |
| 57 | |
| 58 | function joinUrl(base, maybePath) { |
| 59 | const normalizedBase = base.endsWith('/') ? base.slice(0, -1) : base |
| 60 | const normalizedPath = maybePath.startsWith('/') ? maybePath : `/${maybePath}` |
| 61 | return `${normalizedBase}${normalizedPath}` |
| 62 | } |