https://github.com/moevis/dsn-parser
https://github.com/moevis/dsn-parser
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/moevis/dsn-parser
- Owner: moevis
- Created: 2020-04-16T07:31:43.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-03-26T12:56:58.000Z (about 4 years ago)
- Last Synced: 2025-10-11T09:26:24.461Z (8 months ago)
- Language: TypeScript
- Size: 119 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# parser for dsn
fork from https://github.com/fonini/dsn-parser
```typescript
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' }
} */
```