</>PackageGraphPackageGraph

mongodb-connection-string-url

npmv7.0.2TypeScript

MongoDB 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.

2
Direct dependencies

Runtime packages this one declares itself.

7
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

878 KB
Install size

Unpacked size of this package plus its entire runtime tree.

3
Tree depth

Longest resolved dependency chain below this package.

Licenses in the dependency tree

BSD-2-ClauseMIT

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.

PackageWeekly downloadsDependentsLicenseLast release
mongodb-connection-string-urlthis page8.8M1Apache-2.01 month ago
pgpass33M1MIT1 day ago
yn30.3M1MIT1 day ago
tinyrainbow010MIT1 day ago
@expo/sudo-prompt01MIT1 day ago
@vscode/sudo-prompt01MIT1 day ago

Dependencies

Declared by mongodb-connection-string-url v7.0.2. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (18)

@types/chai ^5.0.1@types/mocha ^10.0.10@types/node ^22.9.0@typescript-eslint/eslint-plugin ^8.39.1@typescript-eslint/parser ^8.39.1chai ^4.2.0eslint ^9.33.0eslint-config-prettier ^10.1.8eslint-plugin-import ^2.22.0eslint-plugin-node ^11.1.0eslint-plugin-prettier ^5.5.4eslint-plugin-promise ^7.1.0gen-esm-wrapper ^1.1.3mocha ^11.0.1nyc ^17.1.0ts-node ^10.9.1tsd ^0.33.0typescript ^5.9.2

Used by

Popular packages that depend on mongodb-connection-string-url.

Relationship graph

Dependencies (left) and dependents (right) of mongodb-connection-string-url.

@types/whatwg-urlwhatwg-urlmongodbmongodb-connectio…
mongodb-connection-string-url dependencies dependents

Frequently installed together

Release history

5 releases in the last two years, typically about 43 days apart.

Recent versions of mongodb-connection-string-url
VersionPublishedSizeLicense
7.0.2latest1 month ago38 KBApache-2.0
7.0.17 months ago38 KBApache-2.0
7.0.010 months ago38 KBApache-2.0
4.0.0-alpha10 months ago38 KBApache-2.0
3.0.21 year ago38 KBApache-2.0
3.0.12 years ago38 KBApache-2.0
3.0.02 years ago38 KBApache-2.0
2.6.03 years ago38 KBApache-2.0
2.5.44 years ago38 KBApache-2.0
2.5.34 years ago37 KBApache-2.0
2.5.24 years ago37 KBApache-2.0
2.5.14 years ago36 KBApache-2.0
2.5.04 years ago36 KBApache-2.0
2.4.24 years ago36 KBApache-2.0
2.4.14 years ago35 KBApache-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.

Maintainers

Keywords

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.