mongodb-connection-string-url
npmv7.0.2TypeScriptMongoDB connection strings, based on the WhatWG URL API
Safe to adopt
Yes — mongodb-connection-string-url scores well across adoption, maintenance, weight, supply chain, and licensing. 8.8M downloads per week and 1 known dependents. Last published 56 days ago. 5 releases in the last 2 years.
- AAdoption: grade A, Excellent.
8.8M downloads per week and 1 known dependents.
- AMaintenance: grade A, Excellent.
Last published 56 days ago. 5 releases in the last 2 years.
- BWeight: grade B, Good.
Pulls in 7 transitive packages, about 878 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 3 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
Apache-2.0 — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding mongodb-connection-string-url to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Licenses in the dependency tree
Every license you inherit by installing mongodb-connection-string-url, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node >=20.19.0
- Module format
- ESM + CommonJS
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the mongodb-connection-string-url README.
import ConnectionString from 'mongodb-connection-string-url';
const cs = new ConnectionString('mongodb://localhost');
cs.searchParams.set('readPreference', 'secondary');
console.log(cs.href); // 'mongodb://localhost/?readPreference=secondary'mongodb-connection-string-url vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| mongodb-connection-string-urlthis page | 8.8M | 1 | Apache-2.0 | 1 month ago |
| pgpass | 33M | 1 | MIT | 1 day ago |
| yn | 30.3M | 1 | MIT | 1 day ago |
| tinyrainbow | 0 | 10 | MIT | 1 day ago |
| @expo/sudo-prompt | 0 | 1 | MIT | 1 day ago |
| @vscode/sudo-prompt | 0 | 1 | MIT | 1 day ago |
Dependencies
Declared by mongodb-connection-string-url v7.0.2. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (2)
Dev (18)
Used by
Popular packages that depend on mongodb-connection-string-url.
Relationship graph
Dependencies (left) and dependents (right) of mongodb-connection-string-url.
Frequently installed together
Fully featured SOCKS proxy client supporting SOCKSv4, SOCKSv4a, and SOCKSv5. Includes Bind and Associate functionality.
A collection of credential providers, without requiring service clients like STS, Cognito
Official client encryption module for the MongoDB Node.js driver
[](https://github.com/mongodb-js/zstd/actions/workflows/test.yml)
Get the metadata from a Google Cloud Platform environment
Fastest Snappy compression library in Node.js
An extremely fast JavaScript and CSS bundler and minifier.
An AST-based pattern checker for JavaScript.
Prettier is an opinionated code formatter
Fast, unopinionated, minimalist web framework
TypeScript execution environment and REPL for node.js, with source map support
Signs and prepares requests using AWS Signature Version 4
Release history
5 releases in the last two years, typically about 43 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 7.0.2latest | 1 month ago | 38 KB | Apache-2.0 |
| 7.0.1 | 7 months ago | 38 KB | Apache-2.0 |
| 7.0.0 | 10 months ago | 38 KB | Apache-2.0 |
| 4.0.0-alpha | 10 months ago | 38 KB | Apache-2.0 |
| 3.0.2 | 1 year ago | 38 KB | Apache-2.0 |
| 3.0.1 | 2 years ago | 38 KB | Apache-2.0 |
| 3.0.0 | 2 years ago | 38 KB | Apache-2.0 |
| 2.6.0 | 3 years ago | 38 KB | Apache-2.0 |
| 2.5.4 | 4 years ago | 38 KB | Apache-2.0 |
| 2.5.3 | 4 years ago | 37 KB | Apache-2.0 |
| 2.5.2 | 4 years ago | 37 KB | Apache-2.0 |
| 2.5.1 | 4 years ago | 36 KB | Apache-2.0 |
| 2.5.0 | 4 years ago | 36 KB | Apache-2.0 |
| 2.4.2 | 4 years ago | 36 KB | Apache-2.0 |
| 2.4.1 | 4 years ago | 35 KB | Apache-2.0 |
Overview
mongodb-connection-string-url is an npm package that mongoDB connection strings, based on the WhatWG URL API. It is extremely widely used, with about 8.8M downloads per week and 1 known dependents in the graph. The latest version is 7.0.2, released under the Apache-2.0 license.
Who should use it
Teams working in the npm ecosystem who need mongoDB connection strings, based on the WhatWG URL API and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to minimize your dependency tree, or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (8.8M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (Apache-2.0).
Cons
- Large dependency tree (20 direct dependencies) increases install size and audit surface.
Auto-generated from collected registry metadata. No external claims are inferred.
Frequently asked questions
Should I use mongodb-connection-string-url?
Yes — mongodb-connection-string-url scores well across adoption, maintenance, weight, supply chain, and licensing. 8.8M downloads per week and 1 known dependents. Last published 56 days ago. 5 releases in the last 2 years.
How do I install mongodb-connection-string-url?
Run `npm install mongodb-connection-string-url` to add mongodb-connection-string-url to your npm project.
How many dependencies does mongodb-connection-string-url have?
mongodb-connection-string-url declares 20 direct dependencies and pulls in 7 packages in total once its runtime tree is resolved totalling about 878 KB on disk.
What license is mongodb-connection-string-url released under?
mongodb-connection-string-url is distributed under the Apache-2.0 license. Its dependency tree also includes: BSD-2-Clause, MIT.
How popular is mongodb-connection-string-url?
mongodb-connection-string-url has approximately 8,759,824 downloads per week and 1 known dependent packages.
Is mongodb-connection-string-url still maintained?
The most recent release of mongodb-connection-string-url (v7.0.2) was published 1 month ago.
Does mongodb-connection-string-url run install scripts?
No. mongodb-connection-string-url does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.