UNPKG

fuzzy-regex

Version:

A regular expression library for Node.js that allows for a configurable number of mismatches (fuzzy matching), powered by the high-performance [TRE](https://laurikari.net/tre/) regex engine. This package supports both ESM and CommonJS, and provides a simp

8 lines (6 loc) 278 B
type FuzzyRegex = { test: (str: string, maxErrors?: number) => boolean; exec: (str: string, maxErrors?: number) => string[] | null; }; declare function fuzzyRegex(pattern: string | RegExp, caseInsensitive?: boolean): FuzzyRegex; export { type FuzzyRegex, fuzzyRegex };