url-join
Join urls and normalize as in path.join.
Last updated 8 years ago by jfromaniello .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm 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                                ...           8 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
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 5
Last Day 0
Last Week 5
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)

Copyright 2013 - present © cnpmjs.org | Home |