Parses MongoDB connection strings into structured objects. Based on the url_parser.js from the MongoDB Node.js native driver v2.0. Version 1.1.1 is stable but has no recent updates (last release in 2017). Lightweight with zero dependencies. Provides a simple API to extract hosts, database name, authentication, and options from MongoDB URIs. Suitable for legacy projects, but for new code consider using the official mongodb driver's built-in parsing or the `mongodb-connection-string-url` package.
npm install parse-mongo-urlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Parses a MongoDB connection string and logs the structured result showing hosts, database, auth, and options.
Replace with import { parse } from 'mongodb-connection-string-url' or use MongoClient's built-in parsing.Use const parse = require('parse-mongo-url') (or import parse from 'parse-mongo-url' with ESM).Create a `declare module 'parse-mongo-url'` declaration or use `// @ts-ignore`. Consider switching to mongodb-connection-string-url which has types.
No dependency data recorded yet.