UNPKG

@technobuddha/library

Version:
16 lines (15 loc) 593 B
declare type Options = { /** The compairson will ignore case */ caseInsensitive?: boolean; }; /** * Compute the levenshtein distance between two strings (similarity) * * @param input The string * @param comparedTo The string to compare to * @param __namedParameters see {@link Options} * @default caseInsensitive true * @returns the levenshteinDistance between the two strings (0 for no similarity through 1 for equal) */ export declare function levenshteinDistance(input: string, comparedTo: string, { caseInsensitive }?: Options): number; export default levenshteinDistance;