(base, path)
| 425 | } |
| 426 | |
| 427 | function resolveRelative(base, path) { |
| 428 | if (!/\.\.?\//.test(path)) return path |
| 429 | base = base.replace(/[^\/]+$/, "") |
| 430 | let m |
| 431 | while (m = /^\.(\.)?\//.exec(path)) { |
| 432 | if (m[1]) base = base.replace(/\/[^\/]+\/$/, "/") |
| 433 | path = path.slice(m[0].length) |
| 434 | } |
| 435 | return base + path |
| 436 | } |
| 437 | |
| 438 | class Cached { |
| 439 | constructor(mapping) { |