Neah/node_modules/url-join
2025-04-24 19:10:05 +02:00
..
lib compose mime 2025-04-24 19:10:05 +02:00
LICENSE compose mime 2025-04-24 19:10:05 +02:00
package.json compose mime 2025-04-24 19:10:05 +02:00
README.md compose mime 2025-04-24 19:10:05 +02:00

Join all arguments together and normalize the resulting URL.

Install

npm install url-join

If you want to use it directly in a browser use a CDN like Skypack.

Usage

import urlJoin from 'url-join';

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

console.log(fullUrl);

Prints:

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

License

MIT