(value)
| 189 | } |
| 190 | |
| 191 | function 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 | |
| 203 | function escapeHtml(text) { |
| 204 | const div = document.createElement("div"); |
no test coverage detected