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.

6 lines (5 loc) 408 B
export type OurRange = readonly [number, number]; export declare function subtractRanges(source: OurRange, toSubtract: OurRange): readonly OurRange[]; export declare function intersectRanges(a: OurRange, b: OurRange): OurRange | null; export declare function createRanges(set: ReadonlySet<number>): readonly OurRange[]; export declare function invertRanges(ranges: readonly OurRange[]): readonly OurRange[];