New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

join-url

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

join-url

Like `path.join` but for urls.

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
2
Created
Source

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!

Keywords

hostname

FAQs

Package last updated on 14 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts