@technobuddha > library > String > Fuzzy Match
Function: levenshteinDistance()
ts
function levenshteinDistance(
input: string,
comparedTo: string,
options: LevenshteinDistanceOptions): number;Defined in: levenshtein-distance.ts:23
Compute the levenshtein distance between two strings (similarity)
Parameters
| Parameter | Type | Description |
|---|---|---|
input | string | The string |
comparedTo | string | The string to compare to |
options | LevenshteinDistanceOptions | see LevenshteinDistanceOptions |
Returns
number
the levenshteinDistance between the two strings (0 for no similarity through 1 for equal)
Default Value
ts
caseInsensitive true