Skip to content

damerauLevenshteinBatch

damerauLevenshteinBatch(pairs): number[]

Compute the Damerau-Levenshtein distance for multiple pairs of strings in a single call.

Returns an array of distances in the same order as the input pairs. Each pair must be an array of exactly two strings [a, b]; otherwise an InvalidArg error is thrown.

Parameter Type
pairs readonly (readonly string[])[]

number[]