spaxel/dashboard/node_modules/url-join
jedarden 03f765639b feat(feedback): enhance false positive explanations with diagnostic context
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 12:35:04 -04:00
..
bin feat(feedback): enhance false positive explanations with diagnostic context 2026-04-25 12:35:04 -04:00
lib feat(feedback): enhance false positive explanations with diagnostic context 2026-04-25 12:35:04 -04:00
test feat(feedback): enhance false positive explanations with diagnostic context 2026-04-25 12:35:04 -04:00
.travis.yml feat(feedback): enhance false positive explanations with diagnostic context 2026-04-25 12:35:04 -04:00
CHANGELOG.md feat(feedback): enhance false positive explanations with diagnostic context 2026-04-25 12:35:04 -04:00
LICENSE feat(feedback): enhance false positive explanations with diagnostic context 2026-04-25 12:35:04 -04:00
package.json feat(feedback): enhance false positive explanations with diagnostic context 2026-04-25 12:35:04 -04:00
README.md feat(feedback): enhance false positive explanations with diagnostic context 2026-04-25 12:35:04 -04:00

Join all arguments together and normalize the resulting url.

Install

npm install url-join

Usage

var urljoin = require('url-join');

var fullUrl = urljoin('http://www.google.com', 'a', '/b/cd', '?foo=123');

console.log(fullUrl);

Prints:

'http://www.google.com/a/b/cd?foo=123'

Browser and AMD

It also works in the browser, you can either include lib/url-join.js in your page:

<script src="url-join.js"></script>
<script type="text/javascript">
	urljoin('http://blabla.com', 'foo?a=1')
</script>

Or using an AMD module system like requirejs:

define(['path/url-join.js'], function (urljoin) {
  urljoin('http://blabla.com', 'foo?a=1');
});

License

MIT