MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / formatValue

Method formatValue

packages/baseai/src/utils/logger.ts:37–51  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

35 }
36
37 private formatValue(value: unknown): string {
38 if (typeof value === 'object' && value !== null) {
39 return util.inspect(value, { colors: true, depth: null });
40 }
41 if (typeof value === 'string') {
42 return chalk.green(`"${value}"`);
43 }
44 if (typeof value === 'number') {
45 return chalk.yellow(value.toString());
46 }
47 if (typeof value === 'boolean') {
48 return chalk.cyan(value.toString());
49 }
50 return String(value);
51 }
52
53 private isSensitiveData(key: string): boolean {
54 return sensitiveWords.some(word => key.toLowerCase().includes(word));

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected