MCPcopy Create free account
hub / github.com/ShipSecAI/studio / format

Function format

packages/component-sdk/src/context.ts:2–15  ·  view source on GitHub ↗
(...args: unknown[])

Source from the content-addressed store, hash-verified

1// Simple format function to avoid webpack issues with node:util
2function format(...args: unknown[]): string {
3 return args.map(arg => {
4 if (typeof arg === 'string') return arg;
5 if (arg === null || arg === undefined) return String(arg);
6 if (typeof arg === 'object') {
7 try {
8 return JSON.stringify(arg);
9 } catch {
10 return String(arg);
11 }
12 }
13 return String(arg);
14 }).join(' ');
15}
16
17import type {
18 ExecutionContext,

Callers 2

pushLogFunction · 0.85
createExecutionContextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected