damerauLevenshteinMany
damerauLevenshteinMany(
reference,candidates,maxDistance?):number[]
Compute the Damerau-Levenshtein distance from one reference string to many candidates.
Returns an array of distances, one per candidate, in the same order as the input.
If maxDistance is provided, candidates with distance exceeding the threshold
will return maxDistance + 1, at most 4294967295 (enabling early termination
for better performance). maxDistance must be a non-negative integer or
Infinity (no limit); NaN, negative and fractional values throw an
InvalidArg error.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
reference |
string |
candidates |
readonly string[] |
maxDistance? |
number | null |
Returns
Section titled “Returns”number[]