🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

ssh-url

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssh-url

Utilities to resolute and parse ssh url including scp-like syntax SSH protocol.

0.1.5
latest
npm
Version published
Weekly downloads
730
-12.57%
Maintainers
1
Weekly downloads
 
Created
Source

ssh-url NPM version Build Status Dependency Status

Utilities to resolute and parse ssh url including scp-like syntax SSH protocol.

Installation

$ npm install ssh-url --save

Usage

var url = require('ssh-url');

var parsed = url.parse('git@github.com:kaelzhang/node-ssh-url.git');
// -> {
//   protocol: null,
//   user: 'git',
//   hostname: 'github.com',
//   pathname: '/kaelzhang/node-ssh-url.git'
// }

url.format(parsed);
// -> git@github.com:kaelzhang/node-ssh-url.git

url.parse(urlStr)

Takes a SSH URL string, and returns an object.

urlObj

For now, urlObj only contains four properties.

  • protocol null|String if null, indicates that urlStr uses scp-like syntax.
  • user String
  • hostname String for now, there's no port.
  • pathname String starts with '/'

url.format(urlObj)

Takes a parsed SSH URL object, and returns a formatted URL string.

Keywords

ssh-url

FAQs

Package last updated on 03 Jul 2014

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