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

Function truncate

apps/kimi-code/src/cli/sub/server/ps.ts:144–148  ·  view source on GitHub ↗
(value: string, max: number)

Source from the content-addressed store, hash-verified

142}
143
144function truncate(value: string, max: number): string {
145 if (value.length <= max) return value;
146 if (max <= 1) return value.slice(0, max);
147 return `${value.slice(0, max - 1)}…`;
148}

Callers 1

formatTableFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected