# @maboiteaspam/ssh-host-parse

> parse ssh host like user@host:port

Latest version **1.0.3** (published 2015-12-30) · WTF license · 0 weekly downloads

## Install

```sh
npm install @maboiteaspam/ssh-host-parse
pnpm add @maboiteaspam/ssh-host-parse
yarn add @maboiteaspam/ssh-host-parse
bun add @maboiteaspam/ssh-host-parse
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2015-12-30 |
| First published | 2015-12-30 |
| Weekly downloads | 0 |
| License | WTF |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | maboiteaspam |
| Maintainers | maboiteaspam |
| Keywords | parse, ssh, host |

## Links

- npm: https://www.npmjs.com/package/@maboiteaspam/ssh-host-parse
- npm.io page: https://npm.io/package/@maboiteaspam/ssh-host-parse

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2015-12-30
- 1.0.2 — 2015-12-30

## README

# ssh-host-parse

parse ssh host like `user@host:port`

## Install

    npm i @maboiteaspam/ssh-host-parse --save-dev

## Usage

```js
var hParse = require('@maboiteaspam/ssh-host-parse');

console.log( hParse('some@where') )         // { host: 'where', port: 22, username: 'some' }

console.log( hParse('some@where:15251') )   // { host: 'where', port: 15251, username: 'some' }

console.log( hParse('where:15251') )        // { host: 'where', port: 15251, username: 'root' }

console.log( hParse('else') )               // { host: 'else', port: 22, username: 'root' }


```

## Notes

I have only pulled out the code from `sequest`,
https://github.com/mikeal/sequest/blob/master/index.js#L9

## More

- https://github.com/mikeal/sequest
- https://github.com/maboiteaspam/ssh2-utils

---
_Source: https://npm.io/package/@maboiteaspam/ssh-host-parse · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
