Skip to content

indelMany

indelMany(reference, candidates, maxDistance?): number[]

Compute the Indel 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.

Parameter Type
reference string
candidates readonly string[]
maxDistance? number | null

number[]