re2js is a pure JavaScript port of Google's RE2 regular expression engine, providing linear-time O(n) matching and protection against ReDoS attacks. It implements a full compilation pipeline: parsing RE2 syntax into an AST, simplifying the expression, compiling into a bytecode instruction set (Prog), and executing via multiple engines (DFA, NFA, OnePass, Backtracker, Prefilter). The library exposes a Java-style Matcher API with find, matches, replaceAll, and supports named capture groups, lookbehinds (linear-time), and both JS and Java replacement string dialects. It is distributed as an npm package supporting ESM, CJS, and UMD, with TypeScript declarations, and is tested across Node.js, Bun, Deno, and browsers. The architecture follows Russ Cox's regexp articles and uses sparse sets for efficient NFA simulation. Unicode tables for categories, scripts, and case folding are generated from @unicode/unicode-17.0.0 and decoded lazily.
recheck is a monorepo for a ReDoS (Regular expression Denial of Service) vulnerability checker, written in Scala 3 and cross-compiled to JVM and JavaScript via Scala.js. The system parses regular expression patterns, builds an execution model, and detects catastrophic backtracking vulnerabilities. It exposes multiple interfaces: a core library (`recheck-core`) with a high-level `ReDoS.check` API, a CLI (`recheck-cli`) with `check` and `batch` subcommands (the latter using JSON-RPC over stdio), JavaScript bindings (`recheck-js`) for browser/Node usage, and an ESLint plugin (`eslint-plugin-redos`) for CI integration. The architecture is a multi-module sbt build with Lerna/pnpm for JS workspace management, featuring clean separation between parsing, execution, unicode data, and platform-specific adapters.