2.0.0 • Published 7 years ago

join-url v2.0.0

Weekly downloads
758
License
MIT
Repository
github
Last release
7 years ago

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!