GSI - Employe Self Service Mobile
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
dienianindya 8bd65e0bb9 first commit 2 months ago
..
lib first commit 2 months ago
test first commit 2 months ago
.npmignore first commit 2 months ago
README.md first commit 2 months ago
package.json first commit 2 months ago

README.md

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);

\\will print:

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

This works similar to path.join but you shouldn't use path.join for urls since it will work different depending of the operative systems but also doesn't work for some cases.

License

MIT