GitHub - JakeRoggenbuck/regolith: A server-side TypeScript and JavaScript library immune to Regular Expression Denial of Service (ReDoS) attacks by using Rust and linear RegEx under the hood. Regolith has a linear worst case time complexity, compared to the default RegExp found in TypeScript and JavaScript, which has an exponential worst case.
Regolith is a server-side library that provides a safe Regex alternative in TypeScript and JavaScript, protecting against Regular Expression Denial of Service (ReDoS) attacks.
The regex is written in verbose syntax to enhance readability, allowing whitespace and comments, which aids in understanding the structure of the pattern.