MCPcopy Create free account
hub / github.com/arktypeio/arktype / compare

Function compare

ark/aot/unwrite.ts:402–410  ·  view source on GitHub ↗
(b0: number, b1: number, o0: number, o1: number)

Source from the content-addressed store, hash-verified

400const diff = (base: ModuleTokens, other: ModuleTokens): Hunk[] => {
401 const hunks: Hunk[] = []
402 const compare = (b0: number, b1: number, o0: number, o1: number) =>
403 hunks.push(
404 ...diffOf(
405 base.texts,
406 other.texts,
407 ...tokensIn(base, b0, b1),
408 ...tokensIn(other, o0, o1)
409 )
410 )
411 const compareEnds = (b: number, o: number) => {
412 const end = base.statements[b][1]
413 const otherEnd = other.statements[o][1]

Callers 2

diffFunction · 0.70
diffOfFunction · 0.70

Calls 5

diffOfFunction · 0.85
tokensInFunction · 0.85
compareEachFunction · 0.85
anchorsOfFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected