MongoDB URI Parser and Formatter

JSON →
library 0.9.7 ·javascript abandoned
verified May 27, 2026

The `mongodb-uri` library provides utilities for parsing and formatting MongoDB connection URIs in Node.js environments. It takes a URI string and converts it into a structured JavaScript object, and vice-versa, allowing programmatic manipulation of connection parameters. A key differentiator is its `formatMongoose` function, designed to transform multi-host MongoDB URIs into a format compatible with Mongoose's `connect()` method, which expects individual host/port pairs. This is particularly useful for environments like PaaS providers (e.g., Heroku with MongoLab) where a single URI might need adaptation. The current stable version is 0.9.7, indicating a pre-1.0 status, and the package has seen no updates since early 2017, suggesting it is no longer actively maintained. It handles URL encoding for special characters within usernames, passwords, and database names.

total hits 14
actors 7 distinct systems
last hit 1d ago AhrefsBot
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1
Search engines
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany