npm

Join us for the upcoming webinar, "Enterprise JavaScript done right: the tools you love, the security you need."Sign up here »

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

455

version

2.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability