MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / sparkline

Function sparkline

src/cli/maintain-report-export.ts:27–31  ·  view source on GitHub ↗
(trend: number[])

Source from the content-addressed store, hash-verified

25 d === 'rising' ? 'rising ↑' : d === 'falling' ? 'cooling ↓' : 'steady →';
26
27function 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. */
34export function buildMaintainReportMarkdown(d: MaintainReportData): string {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected