Like Node.js’ `path.resolve`/`url.resolve` for the browser.
github.com/lydell/resolve-url
lydell/resolve-url