MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / stripRepeatedErrorPrefix

Function stripRepeatedErrorPrefix

apps/cli/src/tooling.ts:7–13  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

5 typeof value === "object" && value !== null && !Array.isArray(value);
6
7const stripRepeatedErrorPrefix = (input: string): string => {
8 let output = input.trim();
9 while (output.toLowerCase().startsWith("error:")) {
10 output = output.slice("error:".length).trimStart();
11 }
12 return output;
13};
14
15export const sanitizeCliOutputText = (input: string): string =>
16 input

Callers 1

normalizeCliErrorTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected