MCPcopy
hub / github.com/garrytan/gstack / resultToString

Function resultToString

browse/src/read-commands.ts:113–117  ·  view source on GitHub ↗
(result: unknown)

Source from the content-addressed store, hash-verified

111 * still throws on circular / BigInt-bearing results, same as before.
112 */
113export function resultToString(result: unknown): string {
114 return typeof result === 'object'
115 ? JSON.stringify(result, null, 2)
116 : String(result ?? '');
117}
118
119/**
120 * Write an evaluate result string to disk for `--out`, returning bytes written.

Callers 2

commands.test.tsFile · 0.90
handleReadCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected