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

Function compareEnds

ark/aot/unwrite.ts:411–421  ·  view source on GitHub ↗
(b: number, o: number)

Source from the content-addressed store, hash-verified

409 )
410 )
411 const compareEnds = (b: number, o: number) => {
412 const end = base.statements[b][1]
413 const otherEnd = other.statements[o][1]
414 const ends = base.texts[end - 1] === ";"
415 if (ends === (other.texts[otherEnd - 1] === ";")) return
416 hunks.push(
417 ends ?
418 [end - 1, end, otherEnd, otherEnd]
419 : [end, end, otherEnd - 1, otherEnd]
420 )
421 }
422 const heads = base.statements.map(headOf(base))
423 const otherHeads = other.statements.map(headOf(other))
424 let [b, o] = [0, 0]

Callers 1

diffFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected