(base, path)
| 13 | * @param {string} path |
| 14 | */ |
| 15 | export function resolve(base, path) { |
| 16 | // special case |
| 17 | if (path[0] === '/' && path[1] === '/') return path; |
| 18 | |
| 19 | let url = new URL(base, internal); |
| 20 | url = new URL(path, url); |
| 21 | |
| 22 | return url.protocol === internal.protocol ? url.pathname + url.search + url.hash : url.href; |
| 23 | } |
| 24 | |
| 25 | /** @param {string} path */ |
| 26 | export function is_root_relative(path) { |
no outgoing calls