url-join
Join urls and normalize as in path.join.
Last updated 12 years ago by jfromaniello .
MIT · Repository · Original npm · Tarball · package.json
$ npm install url-join 
SYNC missed versions from official npm registry.

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

Current Tags

  • 5.0.0                                ...           latest (3 years ago)

13 Versions

  • 5.0.0                                ...           3 years ago
  • 4.0.1                                ...           5 years ago
  • 4.0.0                                ...           7 years ago
  • 3.0.0                                ...           7 years ago
  • 2.0.5                                ...           7 years ago
  • 2.0.4                                ...           7 years ago
  • 2.0.3                                ...           7 years ago
  • 2.0.2                                ...           7 years ago
  • 2.0.1                                ...           8 years ago
  • 2.0.0                                ...           8 years ago
  • 1.1.0                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
  • 0.0.1                                ...           12 years ago

© 2010 - cnpmjs.org x YWFE | Home | YWFE