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.

14 lines (13 loc) 496 B
import { RedosDetectorResult } from './redos-detector'; export type ToFriendlyConfig = { alwaysIncludeTrails?: boolean; resultsLimit?: number; }; export declare const defaultResultsLimit = 15; /** * Takes a result and converts it to a text representation. * * Do not try and parse this string programmatically. It may change * between any version. */ export declare function toFriendly(result: RedosDetectorResult, { resultsLimit, alwaysIncludeTrails, }?: ToFriendlyConfig): string;