MCPcopy Create free account
hub / github.com/JunJD/alading / formatValue

Method formatValue

src/utils/debugLogger.ts:49–64  ·  view source on GitHub ↗
(value: any)

Source from the content-addressed store, hash-verified

47 }
48
49 const formatValue = (value: any): any => {
50 if (typeof value === 'string') {
51 return this.formatMultilineString(value);
52 }
53 if (typeof value === 'object' && value !== null) {
54 if (Array.isArray(value)) {
55 return value.map(formatValue);
56 }
57 const formatted: any = {};
58 for (const [key, val] of Object.entries(value)) {
59 formatted[key] = formatValue(val);
60 }
61 return formatted;
62 }
63 return value;
64 };
65
66 return JSON.stringify(formatValue(data), null, 4);
67 }

Callers

nothing calls this directly

Calls 1

formatMultilineStringMethod · 0.95

Tested by

no test coverage detected