brows3r — TypeScript API
    Preparing search index...

    Interface FuzzyMatch

    Lightweight fuzzy matcher for inline filtering.

    Goals:

    • Match characters of query in order (not necessarily consecutive) inside target — same behaviour familiar from VSCode's quick-open or fzf.
    • Score higher when matches are consecutive or near the start.
    • Case-insensitive.
    • Pure + synchronous — no allocations beyond the result.

    Non-goals: full fzf parity, Sublime-style heuristics, diacritic folding. If the score function ever needs tuning the entire surface is two small functions; replacing is one diff.

    Returns null when there is no match. Returns a positive score otherwise; higher = better.

    interface FuzzyMatch {
        matchIndexes: readonly number[];
        score: number;
    }
    Index

    Properties

    Properties

    matchIndexes: readonly number[]

    Indexes of target characters that matched, in order. Empty array when query is empty.

    score: number

    Higher = better.