MCPcopy Create free account
hub / github.com/IgorWarzocha/howcode / parseShortStat

Function parseShortStat

desktop/project-git/project-state.ts:11–19  ·  view source on GitHub ↗
(output: string)

Source from the content-addressed store, hash-verified

9const gitSuffixPattern = /\.git$/i
10
11function parseShortStat(output: string) {
12 const insertionsMatch = output.match(shortStatInsertionsPattern)
13 const deletionsMatch = output.match(shortStatDeletionsPattern)
14
15 return {
16 insertions: insertionsMatch ? Number.parseInt(insertionsMatch[1] ?? '0', 10) : 0,
17 deletions: deletionsMatch ? Number.parseInt(deletionsMatch[1] ?? '0', 10) : 0,
18 }
19}
20
21function parseStatusSummary(output: string) {
22 let fileCount = 0

Callers 1

getDiffStatsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected