(stdout: string)
| 9 | * @returns the totals, or null |
| 10 | */ |
| 11 | export function parseShortstat(stdout: string): Types.DiffStats | null { |
| 12 | const counts = SHORTSTAT_PATTERN.exec(stdout)?.groups |
| 13 | |
| 14 | if (!counts) { |
| 15 | return null |
| 16 | } |
| 17 | |
| 18 | return { |
| 19 | filesCount: Number(counts.files), |
| 20 | linesAdded: Number(counts.added ?? 0), |
| 21 | linesRemoved: Number(counts.removed ?? 0), |
| 22 | } |
| 23 | } |
nothing calls this directly
no outgoing calls
no test coverage detected