MCPcopy Create free account
hub / github.com/ProtonDriveApps/sdk / formatReadableJson

Function formatReadableJson

cli/src/cli/formatters.ts:40–44  ·  view source on GitHub ↗
(json: object)

Source from the content-addressed store, hash-verified

38}
39
40export 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
46export function formatAuthor(author: Author) {
47 return author.ok ? author.value : `(${author.error.claimedAuthor})`;

Callers 3

reportFatalErrorFunction · 0.90
printObjectFunction · 0.85
printIterableFunction · 0.85

Calls 1

sanitizeTerminalTextFunction · 0.85

Tested by

no test coverage detected