mongo-connection-string
JSON →Utility library for parsing, building, and manipulating MongoDB connection strings. Current stable version is 0.1.5. It provides a ConnectionString class to decompose URIs into components (protocol, username, password, hosts, database, options) and serialize them back to URI or human-readable form. The library handles URL encoding/decoding, defaults protocol to mongodb://, and includes a heuristic for percent-encoded characters. It is actively maintained but rarely updated. Key differentiators: lightweight with TypeScript types, no dependencies, designed for both Node.js and browser, and provides a safe toString() that masks passwords.
Resources
packagemongo-connection-string ↗
API endpoints
full doc /v1/registry/mongo-connection-string