Get unlimited public & private packages + team-based management with npm Teams.Learn more »

join-url

2.0.0 • Public • Published

Join-URL
API stability Standard NPM version Downloads

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!

Install

npm i join-url

DownloadsWeekly Downloads

563

Version

2.0.0

License

MIT

Last publish

Collaborators

  • avatar