Function: addInsights()

June 7, 2026 ยท View on GitHub

CTRF


CTRF / addInsights

Function: addInsights()

addInsights(report, historicalReports?, options?): CTRFReport

Defined in: insights.ts:1015

Parameters

report

CTRFReport

The current report to enrich with insights

historicalReports?

CTRFReport[] = []

Array of previous reports for trend analysis

options?

InsightsOptions = {}

Options including baseline for comparison

Returns

CTRFReport

A new report with insights populated

Example

// Basic usage
const reportWithInsights = addInsights(currentReport, previousReports);

// With baseline comparison
const reportWithInsights = addInsights(currentReport, previousReports, {
  baseline: baselineReport
});