urlconcat
Concats paths in an url, places slashes where necessary.
Installation
npm install urlconcat --save
Usage
Importing
All these methods work:
var urlconcat = ;var concat = urlconcatconcat;
import urlconcat from 'urlconcat';const concat = urlconcat.concat;
;
Using
It will place slashes between url parts, but not before query parameters:
; // 'http://localhost:8080/api/search/something?a=b&b=c'
It will remove double slashes:
// 'http://localhost:8080/search
It will leave trailing slashes:
// 'http://localhost:8080/search/