MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / formatRow

Function formatRow

apps/kimi-code/src/cli/sub/server/ps.ts:124–125  ·  view source on GitHub ↗
(cells: string[])

Source from the content-addressed store, hash-verified

122
123 const widths = header.map((h, i) => Math.max(h.length, ...rows.map((r) => r[i]!.length)));
124 const formatRow = (cells: string[]): string =>
125 cells.map((cell, i) => cell + ' '.repeat(Math.max(0, widths[i]! - cell.length))).join(' ');
126
127 const lines = [chalk.bold(formatRow(header)), ...rows.map(formatRow)];
128 return `${lines.join('\n')}\n`;

Callers 1

formatTableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected