MCPcopy Create free account
hub / github.com/continuedev/continue / stringsWithinLevDistThreshold

Function stringsWithinLevDistThreshold

core/edit/lazy/deterministic.ts:245–252  ·  view source on GitHub ↗
(
  a: string,
  b: string,
  threshold: number,
)

Source from the content-addressed store, hash-verified

243}
244
245function stringsWithinLevDistThreshold(
246 a: string,
247 b: string,
248 threshold: number,
249) {
250 const dist = distance(a, b);
251 return dist / Math.min(a.length, b.length) <= threshold;
252}
253
254function programNodeIsSimilar(
255 programNode: Parser.SyntaxNode,

Callers 1

nodesAreSimilarFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected