matchFuzzy()
Match your query fuzzy on given target
Example (UI excluded)
Input = he
Result = highlighted characters
Usage
Below is the type definition of the exported functions. For any issues or questions, just create an issue and I'll respond asap.
export declare type MatchResult = {
offset: number;
positions: number[];
extraChars: number;
trailingChars: number;
};
export declare function matchFuzzy(query: string, target: string, characterLimit?: {
[character: string]: number;
}): MatchResult | null;
export declare function sort(a: MatchResult, b: MatchResult): 1 | -1 | 0;