MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / formatValue

Function formatValue

src/settings/lspServerDetail.js:191–201  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

189}
190
191function formatValue(value) {
192 if (value === undefined || value === null || value === "") return "";
193 let text = String(value);
194 if (text.includes("\n")) {
195 [text] = text.split("\n");
196 }
197 if (text.length > 47) {
198 text = `${text.slice(0, 47)}...`;
199 }
200 return text;
201}
202
203function escapeHtml(text) {
204 const div = document.createElement("div");

Callers 1

updateItemDisplayFunction · 0.70

Calls 1

StringInterface · 0.85

Tested by

no test coverage detected