(json: object)
| 38 | } |
| 39 | |
| 40 | export function formatReadableJson(json: object) { |
| 41 | // Prints the JSON in a readable format without the depth limit. |
| 42 | // No styling: `colors` would add VT sequences that must not mix with unsanitized user strings. |
| 43 | return sanitizeTerminalText(inspect(json, { showHidden: false, depth: null, colors: false })); |
| 44 | } |
| 45 | |
| 46 | export function formatAuthor(author: Author) { |
| 47 | return author.ok ? author.value : `(${author.error.claimedAuthor})`; |
no test coverage detected