@technobuddha/library
Version:
A large library of useful functions
16 lines (15 loc) • 593 B
TypeScript
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;