MCPcopy Create free account
hub / github.com/SethGammon/Citadel / truncate

Function truncate

scripts/dashboard.js:111–115  ·  view source on GitHub ↗
(value, max)

Source from the content-addressed store, hash-verified

109 return detail.entries.filter((entry) => statuses.has(entry.status)).length;
110}
111
112function truncate(value, max) {
113 const text = String(value || '').replace(/\s+/g, ' ').trim();
114 if (text.length <= max) return text;
115 return `${text.slice(0, Math.max(0, max - 3))}...`;
116}
117
118function relativeTime(timestamp, now = new Date()) {

Callers 3

describeTelemetryFunction · 0.85
classifyHookProblemFunction · 0.85
renderDashboardFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected