@technobuddha/library
Version:
A large library of useful functions
20 lines (19 loc) • 707 B
TypeScript
/**
* Options for the {@link diceCoefficient} function
* @group String
* @category Fuzzy Match
*/
export type DiceCoefficientOptions = {
/** compare the two strings in case insensitive mode */
caseInsensitive?: boolean;
};
/**
* Compute the dice coefficient measure of similarity between two strings
* @param input - The first string
* @param compareTo - The second string
* @param __nameParameters - see {@link DiceCoefficientOptions}
* @returns a number from 0 (not similar) to 1 (equal) measuring the similarity
* @group String
* @category Fuzzy Match
*/
export declare function diceCoefficient(input: string, compareTo: string, { caseInsensitive }?: DiceCoefficientOptions): number;