Join urls or path with this library, its a wrapper which uses nodejs path module(https://nodejs.org/api/path.html) and url-join(https://github.com/jfromaniello/url-join) package internally
The first parameter is checked for string 'http', and based on it the concatenation is performed.
Install
npm install join-path-or-url