Generic short preview of a payload.
(payload: any)
| 57 | |
| 58 | /** Generic short preview of a payload. */ |
| 59 | function genericPreview(payload: any): string { |
| 60 | if (payload == null) return "" |
| 61 | const text = compactJson(payload) |
| 62 | if (text.length <= MAX_PAYLOAD_PREVIEW_CHARS) return text |
| 63 | return text.slice(0, MAX_PAYLOAD_PREVIEW_CHARS) + "..." |
| 64 | } |
| 65 | |
| 66 | /** |
| 67 | * Summarize a Command for timeline overview: keeps metadata fields, |
no test coverage detected