MCPcopy Create free account
hub / github.com/ZingerLittleBee/ServerBee / formatBytes

Function formatBytes

apps/web/src/lib/utils.ts:50–57  ·  view source on GitHub ↗
(bytes: number)

Source from the content-addressed store, hash-verified

48}
49
50/** ISO `{from, to}` window ending now and reaching `hours` back — the query
51 * window shape every records/anomalies endpoint expects. */
52export function isoWindow(hours: number): { from: string; to: string } {
53 const now = new Date()
54 return {
55 from: new Date(now.getTime() - hours * 3600 * 1000).toISOString(),
56 to: now.toISOString()
57 }
58}
59
60export function formatBytes(bytes: number): string {

Callers 15

ServerCardInnerFunction · 0.90
MetricValueFunction · 0.90
TrafficProgressFunction · 0.90
TrafficCardFunction · 0.90
CycleOverviewCardFunction · 0.90
DailyTrendChartFunction · 0.90
HistoryCycleChartFunction · 0.90
FileUploadDialogFunction · 0.90
FileBrowserFunction · 0.90
TransferBarFunction · 0.90
FileInfoPanelFunction · 0.90
formatValueFunction · 0.90

Calls 2

minMethod · 0.80
logMethod · 0.80

Tested by

no test coverage detected