MCPcopy Create free account
hub / github.com/backnotprop/plannotator / addLineCounts

Function addLineCounts

packages/shared/workspace-status.ts:130–141  ·  view source on GitHub ↗
(
	target: Map<string, { additions: number; deletions: number }>,
	source: Map<string, { additions: number; deletions: number }>,
)

Source from the content-addressed store, hash-verified

128}
129
130function addLineCounts(
131 target: Map<string, { additions: number; deletions: number }>,
132 source: Map<string, { additions: number; deletions: number }>,
133): void {
134 for (const [path, counts] of source) {
135 const existing = target.get(path) ?? { additions: 0, deletions: 0 };
136 target.set(path, {
137 additions: existing.additions + counts.additions,
138 deletions: existing.deletions + counts.deletions,
139 });
140 }
141}
142
143function combinedLineCounts(
144 ...sources: Array<Map<string, { additions: number; deletions: number }>>

Callers 1

combinedLineCountsFunction · 0.85

Calls 2

getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected