</>PackageGraphPackageGraph

path-to-regexp

npmv8.4.2TypeScript

Express style path to RegExp utility

Safe to adopt

Yes — path-to-regexp scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 161 days ago. 13 releases in the last 2 years.

  • ?Adoption: grade ?, Not reported by this registry.

    No download data reported for this package yet.

  • BMaintenance: grade B, Good.

    Last published 161 days ago. 13 releases in the last 2 years.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 58 KB installed.

  • ASupply chain: grade A, Excellent.

    No install scripts, 6 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 path-to-regexp 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.

58 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
CommonJS only
TypeScript
Types included
Install scripts
None

Quick start

A usage example from the path-to-regexp README.

const {
  match,
  pathToRegexp,
  compile,
  parse,
  stringify,
} = require("path-to-regexp");

path-to-regexp vs the alternatives

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

PackageWeekly downloadsDependentsLicenseLast release
path-to-regexpthis page02MIT5 months ago
escape-string-regexp361M8MIT6 days ago
express132.9M17MIT6 days ago
is-regex104.2M1MIT6 days ago
cors76.8M6MIT6 days ago
balanced-match01MIT6 days ago

Dependencies

Declared by path-to-regexp v8.4.2. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (9)

@borderless/ts-scripts ^0.15.0@size-limit/preset-small-lib ^11.1.2@types/node ^22.7.2@types/semver ^7.3.1@vitest/coverage-v8 ^3.0.5recheck ^4.5.0size-limit ^11.1.2typescript ^5.7.3vitest ^3.0.5

Used by

Popular packages that depend on path-to-regexp.

Relationship graph

Dependencies (left) and dependents (right) of path-to-regexp.

routermswpath-to-regexp
path-to-regexp dependencies dependents

Frequently installed together

Release history

6 releases in the last two years, typically about 4 days apart.

Recent versions of path-to-regexp
VersionPublishedSizeLicense
8.4.2latest5 months ago58 KBMIT
8.4.15 months ago59 KBMIT
8.4.05 months ago62 KBMIT
0.1.135 months ago6.5 KBMIT
8.3.01 year ago55 KBMIT
0.1.121 year ago6.4 KBMIT
8.2.01 year ago54 KBMIT
0.1.112 years ago6.4 KBMIT
6.3.02 years ago109 KBMIT
3.3.02 years ago25 KBMIT
1.9.02 years ago24 KBMIT
7.2.02 years ago64 KBMIT
8.1.02 years ago55 KBMIT
8.0.02 years ago50 KBMIT
0.1.102 years ago6.2 KBMIT

Overview

path-to-regexp is an npm package that express style path to RegExp utility. It has 2 known dependents in the graph. The latest version is 8.4.2, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need express style path to RegExp utility and value a focused 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

  • 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

Funding

Frequently asked questions

Should I use path-to-regexp?

Yes — path-to-regexp scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 161 days ago. 13 releases in the last 2 years.

How do I install path-to-regexp?

Run `npm install path-to-regexp` to add path-to-regexp to your npm project.

What license is path-to-regexp released under?

path-to-regexp is distributed under the MIT license.

How popular is path-to-regexp?

npm does not publish download counts. Within PackageGraph's crawl, 2 known packages depend on path-to-regexp.

Is path-to-regexp still maintained?

The most recent release of path-to-regexp (v8.4.2) was published 5 months ago.

Does path-to-regexp run install scripts?

No. path-to-regexp does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.