UNPKG

redos-detector

Version:

A CLI and library which tests helps score how vulnerable a regex pattern is to ReDoS attacks. Supported in the browser, Node and Deno.

7 lines (6 loc) 228 B
import { RootNode } from 'regjsparser'; export type MyFeatures = { unicodePropertyEscape: true; }; export type MyRootNode = RootNode<MyFeatures>; export declare function parse(pattern: string, unicode: boolean): MyRootNode;