MCPcopy Index your code
hub / github.com/pomber/code-surfer / linesDiff

Function linesDiff

packs/step-parser/src/differ.ts:88–95  ·  view source on GitHub ↗
(codeList: string[])

Source from the content-addressed store, hash-verified

86}
87
88export function linesDiff(codeList: string[]) {
89 const steps: number[][] = [];
90 const lineIds: number[] = [];
91 codeList.forEach((_, i) => {
92 steps.push(getStepIds(lineIds, steps[i - 1], codeList[i - 1], codeList[i]));
93 });
94 return { lineIds, steps };
95}

Callers 2

parseStepsFunction · 0.90
differ.test.tsFile · 0.90

Calls 1

getStepIdsFunction · 0.85

Tested by

no test coverage detected