UNPKG

npaw-plugin-nwf

Version:
21 lines (20 loc) 594 B
/** * Tracks metrics changes and returns only changed values */ export default class MetricsDiffer { private previousMetrics; /** * Get changed metrics by comparing current with previous * @param currentMetrics - Current metrics object * @returns Only the metrics that have changed since last call */ getChangedMetrics(currentMetrics: object): object; /** * Reset the differ (clear previous metrics) */ reset(): void; /** * Get the previous metrics snapshot (for testing/debugging) */ getPreviousMetrics(): object | null; }