</>PackageGraphPackageGraph

safe-regex2

npmv5.1.1TypeScript

detect possibly catastrophic, exponential-time regular expressions

Safe to adopt

Yes — safe-regex2 scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 144 days ago. 4 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 144 days ago. 4 releases in the last 2 years.

  • AWeight: grade A, Excellent.

    Pulls in 1 transitive package, about 79 KB installed.

  • ASupply chain: grade A, Excellent.

    No install scripts, 10 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 safe-regex2 to a project.

1
Direct dependencies

Runtime packages this one declares itself.

1
Total installed

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

79 KB
Install size

Unpacked size of this package plus its entire runtime tree.

1
Tree depth

Longest resolved dependency chain below this package.

Licenses in the dependency tree

MIT

Every license you inherit by installing safe-regex2, not just its own. Check this before a legal review, not after.

Compatibility

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

Quick start

A usage example from the safe-regex2 README.

const safe = require('safe-regex2');
const regex = process.argv.slice(2).join(' ');
console.log(safe(regex));

safe-regex2 vs the alternatives

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

PackageWeekly downloadsDependentsLicenseLast release
safe-regex2this page02MIT4 months ago
escape-string-regexp316.5M8MIT1 day ago
is-glob137.4M3MIT1 day ago
is-regex75.1M1MIT1 day ago
json-stringify-safe36.4M1ISC1 day ago
exponential-backoff25.7M1Apache-2.01 day ago

Dependencies

Declared by safe-regex2 v5.1.1. Runtime dependencies are installed with the package; dev dependencies are not.

Runtime (1)

Dev (4)

c8 ^11.0.0eslint ^9.17.0neostandard ^0.13.0tsd ^0.33.0

Used by

Popular packages that depend on safe-regex2.

Relationship graph

Dependencies (left) and dependents (right) of safe-regex2.

retfind-my-way@wdio/loggersafe-regex2
safe-regex2 dependencies dependents

Frequently installed together

Release history

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

Recent versions of safe-regex2
VersionPublishedSizeLicense
5.1.1latest4 months ago11 KBMIT
5.1.06 months ago11 KBMIT
5.0.01 year ago9.0 KBMIT
4.0.11 year ago9.0 KBMIT
4.0.02 years ago7.8 KBMIT
3.1.03 years ago7.4 KBMIT
3.0.04 years ago6.3 KBMIT
2.0.07 years ago5.3 KBMIT

Overview

safe-regex2 is an npm package that detect possibly catastrophic, exponential-time regular expressions. It has 2 known dependents in the graph. The latest version is 5.1.1, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need detect possibly catastrophic, exponential-time regular expressions 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 safe-regex2?

Yes — safe-regex2 scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 144 days ago. 4 releases in the last 2 years.

How do I install safe-regex2?

Run `npm install safe-regex2` to add safe-regex2 to your npm project.

How many dependencies does safe-regex2 have?

safe-regex2 declares 5 direct dependencies and pulls in 1 packages in total once its runtime tree is resolved totalling about 79 KB on disk.

What license is safe-regex2 released under?

safe-regex2 is distributed under the MIT license.

How popular is safe-regex2?

npm does not publish download counts. Within PackageGraph's crawl, 2 known packages depend on safe-regex2.

Is safe-regex2 still maintained?

The most recent release of safe-regex2 (v5.1.1) was published 4 months ago.

Does safe-regex2 run install scripts?

No. safe-regex2 does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.