@moevis/dsn-parser
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

parser for dsn

fork from https://github.com/fonini/dsn-parser

const DSNParser = require('dsn-parser');

const dsn = new DSNParser('pgsql://user:pass@127.0.0.1:5432/my_db?sslmode=verify-full&application_name=myapp');
dsn.getParts();

/*
{ 
  driver: 'pgsql',
  user: 'user',
  password: 'pass',
  host: '127.0.0.1',
  port: 5432,
  database: 'my_db',
  params: { sslmode: 'verify-full', application_name: 'myapp' } 
} */

Readme

Keywords

Package Sidebar

Install

npm i @moevis/dsn-parser

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

4.71 kB

Total Files

8

Last publish

Collaborators

  • moevis