MongoDB URI Parser and Formatter
JSON →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.
Traffic · last 30 days ↑150% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany