Join urls and normalize as in path.join.
Join all arguments together and normalize the resulting url.
npm install url-join
var urljoin = require'url-join';var fullUrl = urljoin'' 'a' '/b/cd' '?foo=123';console.logfullUrl;\\will print:''
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.