UNPKG

closest-match

Version:

Uses Levenshtein Distance to find the closest string match or matches in an array

3 lines (2 loc) 190 B
export declare const distance: (a: string, b: string) => number; export declare const closestMatch: (target: string, array: string[], showOccurrences?: boolean) => string | string[] | null;