Optimized Regular Expressions for JavaScript

JSON →
library 1.0.1 ·javascript abandoned
verified May 27, 2026

The `perf-regexes` package (current version 1.0.1, last updated in late 2018) provides a collection of pre-optimized regular expressions tailored for common parsing tasks in JavaScript. This includes patterns for identifying HTML comments, JavaScript comments (single and multi-line), various types of strings (single and double-quoted), and managing line endings. It offers utilities for detecting empty lines, non-empty lines, trailing whitespace, and normalizing line-ending styles. The library supports both CommonJS and UMD builds, making it usable in Node.js environments (with a minimum requirement of Node.js 6.14) and directly in browsers via a global `R` object. A key differentiator is its focus on robust, pre-built, and tested regex patterns that simplify complex parsing challenges, especially for nested structures or escaped characters, which are notoriously difficult to handle with custom regexes. The package also ships with TypeScript definitions, enhancing developer experience in type-checked environments. Despite its utility, the package has not received updates since 2018, indicating it is no longer actively maintained.

total hits 15
actors 8 distinct systems
last hit 1d ago human
GPTBot
2
Script
1
ClaudeBot
1
MetaBot
1
Search engines
2
Humans
1

top countries 🇺🇸 United States · 🇩🇪 Germany · 🇨🇦 Canada · 🇫🇷 France · 🇬🇧 United Kingdom