Parses MongoDB connection strings into structured objects with auth, server, database, and replica set options. Version 1.0.2 is stable but no longer actively maintained; the functionality is provided natively by the mongodb driver's MongoClient constructor. For production use, prefer official MongoDB driver's connection string parsing over this standalone package.
npm install mongo-url-parserNo 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 object with auth, servers, and options.
Migrate to `new MongoClient(url)` from 'mongodb' package which parses the URL internally.
Ensure password is URL-encoded (e.g., %40 for @) before passing to parser.
Use `import parseUrl from 'mongo-url-parser'` or `const parser = require('mongo-url-parser')`.Add `// @ts-ignore` before import or create a `mongo-url-parser.d.ts` file with `declare module 'mongo-url-parser';`.
No dependency data recorded yet.