# ts-parse-database-url

> Parse database urls

Latest version **1.0.3** (published 2018-07-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install ts-parse-database-url
pnpm add ts-parse-database-url
yarn add ts-parse-database-url
bun add ts-parse-database-url
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2018-07-25 |
| First published | 2018-07-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Herlon Aguiar |
| Maintainers | herlon214 |

## Links

- npm: https://www.npmjs.com/package/ts-parse-database-url
- Repository: https://github.com/herlon214/ts-parse-database-url
- Homepage: https://github.com/herlon214/ts-parse-database-url#readme
- Issues: https://github.com/herlon214/ts-parse-database-url/issues
- npm.io page: https://npm.io/package/ts-parse-database-url

## Dependencies (1)

- [mongodb-uri](https://npm.io/package/mongodb-uri.md) ^0.9.7

## Recent versions

- 1.0.3 (latest) — 2018-07-25
- 1.0.2 — 2018-07-25
- 1.0.1 — 2018-07-25
- 1.0.0 — 2018-07-25

## README

# TypeScript Parse Database Url

## Install
```
$ npm i ts-parse-database-url
```

## Usage
```
import parseDatabaseUrl from 'ts-parse-database-url';

const dbUrl = 'mysql://someuser@server.heroku.com:1337/herokudb'
const parsed = parseDatabaseUrl(dbUrl)

/**
 * parsed = {
 *   'driver': 'mysql',
 *   'user': 'someuser',
 *   'host': 'server.heroku.com',
 *   'port': '1337',
 *   'database': 'herokudb'
 * }
*/
```

Look at `src/__tests__` for more tests examples.



_Thanks to https://github.com/pwnall/node-parse-database-url for creating the original lib :tada:_

---
_Source: https://npm.io/package/ts-parse-database-url · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
