DSN Parser

JSON →
library 1.0.3 ·javascript maintenance
verified May 27, 2026

The `dsn-parser` package (currently at version 1.0.3) provides a fluent API for parsing and constructing database connection strings (DSNs). It supports common DSN formats, extracting components such as driver, user, password, host, port, database name, and query parameters. A primary use case demonstrated is parsing Heroku-style PostgreSQL environment variables (`pgsql://user:pass@host:port/database`) into an object format compatible with popular database drivers like `node-postgres`. The library can also be used to programmatically build DSNs from individual components, offering a concise way to manage database connection configurations. It is a focused utility library solely for DSN manipulation.

total hits 16
actors 6 distinct systems
last hit 21h ago human
MetaBot
4
GPTBot
2
Script
1
ChatGPT-User
1
Search engines
1
Humans
4

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇬🇧 United Kingdom · 🇩🇪 Germany · ZA