Methods
(static) similarity(a, b) → {number}
Calculates the Levenshtein distance between two strings.
Parameters:
Name | Type | Description |
---|---|---|
a |
string | The first string for comparison. |
b |
string | The second string for comparison. |
- Source:
Returns:
- The Levenshtein distance, representing the minimum number of single-character edits (insertions, deletions, or substitutions) required to transform one string into the other.
- Type
- number