@coderevivehq/resolve-url
v0.2.2
Published
Like Node.js’ `path.resolve`/`url.resolve` for the browser.
Readme
Overview
resolve-url resolves one or more URL references in a browser document, using the browser's own URL-resolution behavior. It is useful for browser-focused code that needs the final absolute URL after following relative, root-relative, protocol-relative, or absolute references in sequence.
Maintained by CodeRevive
This maintained continuation is published by CodeRevive. Security patches are our highest priority. We also review bug reports, feature requests, and suggestions from the community.
The project is based on the original resolve-url repository by Simon Lydell and its contributors.
Quick links
- Overview
- Maintained by CodeRevive
- Installation & setup
- Documentation
- Usage
- Contributing
- Security & support
- Credits & license
Installation & setup
npm install @coderevivehq/resolve-urlThe package is a browser utility. It supports CommonJS, AMD, and a browser-global resolveUrl export.
Documentation
Detailed documentation is maintained with the source code in the docs/ directory. Start with the documentation overview, then use the Usage guide and API reference.
Usage
var resolveUrl = require("@coderevivehq/resolve-url")
resolveUrl(
"https://example.com/static/scripts/app.js",
"../source-maps/app.js.map"
)
// "https://example.com/static/source-maps/app.js.map"For browser-global and AMD loading, URL sequencing, and edge cases, see the documentation overview.
Contributing
Bug reports, focused improvements, and documentation updates are welcome through GitHub issues and pull requests. Please run npm test before submitting a change.
Security & support
Report security concerns privately through the repository's Security page. For usage questions and ordinary bugs, open a GitHub issue with a minimal reproduction when possible.
Credits & license
This project is a maintained continuation of lydell/resolve-url. Original code and CodeRevive-authored changes are licensed under the MIT License. Original copyright notices are retained in LICENSE.
