(rows: readonly { created_at: string; }[], window_start: number, cap: number): { count: number; label: string; } import {count_in_window} from '@fuzdev/fuz_app/ui/ui_format.js'; Count the rows of a newest-first list created at or after window_start,
for a list fetched with a row cap. The label reads N+ when the cap may cut
the window off — the list is full and its oldest row is still inside the
window.
rows
newest-first rows, as a capped list query returns them
readonly { created_at: string; }[]window_start
the window's start, in epoch milliseconds
numbercap
the row limit the list was fetched with
numberreturns
{ count: number; label: string; } the count and its display label