MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / formatMeta

Function formatMeta

ui/src/components/workspace/FilesPanel.tsx:134–137  ·  view source on GitHub ↗
(e: FileEntry)

Source from the content-addressed store, hash-verified

132}
133
134function formatMeta(e: FileEntry): string {
135 if (e.kind !== 'file' || e.sizeBytes === null) return formatRelativeTime(e.mtime);
136 return `${formatSize(e.sizeBytes)} · ${formatRelativeTime(e.mtime)}`;
137}
138
139function formatSize(n: number): string {
140 if (n < 1024) return `${n}B`;

Callers 1

FilesPanelFunction · 0.85

Calls 2

formatRelativeTimeFunction · 0.90
formatSizeFunction · 0.85

Tested by

no test coverage detected