</>PackageGraphPackageGraph

pg-connection-string

npmv2.14.0TypeScript

Functions for dealing with a PostgreSQL connection string

Safe to adopt

Yes — pg-connection-string scores well across adoption, maintenance, weight, supply chain, and licensing. 38.9M downloads per week and 2 known dependents. Last published 83 days ago. 14 releases in the last 2 years.

  • AAdoption: grade A, Excellent.

    38.9M downloads per week and 2 known dependents.

  • AMaintenance: grade A, Excellent.

    Last published 83 days ago. 14 releases in the last 2 years.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 16 KB installed.

  • ASupply chain: grade A, Excellent.

    No install scripts, 4 maintainers, and a contained dependency surface.

  • ALicense: grade A, Excellent.

    MIT — 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 pg-connection-string to a project.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

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

16 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

Longest resolved dependency chain below this package.

Compatibility

Node.js
No constraint declared
Module format
ESM + CommonJS
TypeScript
Types included
Install scripts
None

Quick start

A usage example from the pg-connection-string README.

const parse = require('pg-connection-string').parse;

const config = parse('postgres://someuser:somepassword@somehost:381/somedatabase')

pg-connection-string vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
pg-connection-stringthis page38.9M2MIT2 months ago
query-string22.1M3MIT1 day ago
parse-json02MIT1 day ago
strnum01MIT1 day ago
escape-string-regexp316.5M8MIT1 day ago
is-glob137.4M3MIT1 day ago

Dependencies

Declared by pg-connection-string v2.14.0. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (8)

@types/pg ^8.12.0chai ^4.1.1coveralls ^3.0.4istanbul ^0.4.5mocha ^11.7.5nyc ^15tsx ^4.19.4typescript ^6.0.3

Used by

Popular packages that depend on pg-connection-string.

Relationship graph

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

pgknexpg-connection-str…
pg-connection-string dependencies dependents

Frequently installed together

Release history

13 releases in the last two years, typically about 33 days apart.

Recent versions of pg-connection-string
VersionPublishedSizeLicense
2.14.0latest2 months ago16 KBMIT
2.13.03 months ago15 KBMIT
2.12.06 months ago15 KBMIT
2.11.07 months ago15 KBMIT
2.10.17 months ago15 KBMIT
2.10.07 months ago15 KBMIT
2.9.11 year ago15 KBMIT
2.9.01 year ago14 KBMIT
2.8.51 year ago15 KBMIT
2.8.21 year ago15 KBMIT
2.8.11 year ago15 KBMIT
2.8.01 year ago15 KBMIT
2.7.1-alpha.01 year ago15 KBMIT
2.7.02 years ago8.9 KBMIT
2.6.42 years ago8.9 KBMIT

Overview

pg-connection-string is an npm package that functions for dealing with a PostgreSQL connection string. It is extremely widely used, with about 38.9M downloads per week and 2 known dependents in the graph. The latest version is 2.14.0, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need functions for dealing with a PostgreSQL connection string and value a battle-tested, widely-adopted solution.

When not to use it

Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.

Pros

  • Large, well-established user base (38.9M weekly downloads).
  • Ships TypeScript type definitions.
  • Clear open-source license (MIT).

Cons

  • No significant drawbacks detected from available metadata.

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Keywords

Frequently asked questions

Should I use pg-connection-string?

Yes — pg-connection-string scores well across adoption, maintenance, weight, supply chain, and licensing. 38.9M downloads per week and 2 known dependents. Last published 83 days ago. 14 releases in the last 2 years.

How do I install pg-connection-string?

Run `npm install pg-connection-string` to add pg-connection-string to your npm project.

What license is pg-connection-string released under?

pg-connection-string is distributed under the MIT license.

How popular is pg-connection-string?

pg-connection-string has approximately 38,911,519 downloads per week and 2 known dependent packages.

Is pg-connection-string still maintained?

The most recent release of pg-connection-string (v2.14.0) was published 2 months ago.

Does pg-connection-string run install scripts?

No. pg-connection-string does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.