2.0.0 • Published 7 years ago
join-url v2.0.0
Like path.join
for urls.
Installation
npm install join-url
Example
var join = require('join-url');
join.pathname("/admin/", "dashboard/", "/messages", "new");
//-> "/admin/dashboard/messages/new"
join.hostname(".sub.", "domain.", ".co", "uk");
//-> "sub.domain.co.uk"
join.query("&a=1&", "b=2&", "&c=3", "d=4");
//-> "a=1&b=2&c=3&d=4"
Contributions
- Use
npm test
to run tests.
Please feel free to create a PR!