(trend: number[])
| 25 | d === 'rising' ? 'rising ↑' : d === 'falling' ? 'cooling ↓' : 'steady →'; |
| 26 | |
| 27 | function sparkline(trend: number[]): string { |
| 28 | const max = Math.max(1, ...trend); |
| 29 | const b = '▁▂▃▄▅▆▇█'; |
| 30 | return trend.map(n => b[Math.min(7, Math.round((n / max) * 7))]).join(''); |
| 31 | } |
| 32 | |
| 33 | /** Markdown report — paste into a PR / issue / team chat. PURE. */ |
| 34 | export function buildMaintainReportMarkdown(d: MaintainReportData): string { |
no outgoing calls
no test coverage detected