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

Function printObject

cli/src/cli/formatters.ts:7–13  ·  view source on GitHub ↗
(object: object | undefined, json: boolean)

Source from the content-addressed store, hash-verified

5import { Author, MemberRole } from '@protontech/drive-sdk';
6
7export function printObject(object: object | undefined, json: boolean) {
8 if (json) {
9 console.log(sanitizeTerminalText(JSON.stringify(object)));
10 } else {
11 console.log(object ? formatReadableJson(object) : 'N/A');
12 }
13}
14
15export async function printIterable<T extends object>(
16 iterable: AsyncIterable<T> | T[],

Callers 8

actionMethod · 0.90
actionMethod · 0.90
actionMethod · 0.90
actionMethod · 0.90
actionMethod · 0.90
actionMethod · 0.90
actionMethod · 0.90
actionMethod · 0.90

Calls 3

sanitizeTerminalTextFunction · 0.85
formatReadableJsonFunction · 0.85
logMethod · 0.65

Tested by

no test coverage detected