Versie 0.3.3

This commit is contained in:
Atreides Assets committed 2026-10-30 12:28:48 +01:00
1 parent 1cf6eeed29
commit 6e741a51fe
57 files changed
+1362 -2135

No files matched your search

+8 -1
View File
@@ -1,4 +1,4 @@
// Generated, do not edit. sha256:79d0944a46421ed3e71c6aff535ca9c3c77b373253595260dd7e749f587d9edd
// Generated, do not edit. sha256:1e2f6b41323ddf9ad9f82e4a351a8a2bf38460efa6a6ea846e58268ba7ab38e4
import { CONFIG } from '../../shared/config.js';
import { windowTwr, windowFactors } from './performance.js';
import { dailyResults, meetVenster, rollingWindows, seriesFor, windowResult } from './series.js';
@@ -32,6 +32,13 @@ export function returnLine(input = {}, venster = null) {
return { amount: windowResult(input, venster), pct: windowTwr(input, venster), points };
}
export function flatLine(days, today) {
const n = Math.max(2, days);
const end = Date.parse(`${today}T00:00:00Z`);
const labels = Array.from({ length: n }, (_, k) => new Date(end - (n - 1 - k) * 86_400_000).toISOString().slice(0, 10));
return { amount: 0, pct: 0, labels, points: labels.map((_, i) => ({ i, cumulative: 0, day: 0, pct: 0 })) };
}
export function contributorsPerDay(reeks = {}, ids = [], venster = null, n = 3) {
const out = new Map();
if (!venster || !ids || ids.length < 2) return out;