Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

url-join

jfromaniello27.7mMIT5.0.0TypeScript support: included

Join urls and normalize as in path.join.

url, join

readme

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

changelog

4.0.0 - 2018-02-02

3.0.0 - 2018-01-12

2.0.5 - 2018-01-10

2.0.4 - 2018-01-10

2.0.3 - 2018-01-09

2.0.2 - 2017-05-18

2.0.1 - 2017-04-12

2.0.0 - 2017-04-11

1.1.0 - 2016-04-05

1.0.0 - 2016-03-23

0.1.0 - 2016-03-23