MCPcopy
hub / github.com/bombshell-dev/clack / clearPrevMessage

Function clearPrevMessage

packages/prompts/src/spinner.ts:104–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102 };
103
104 const clearPrevMessage = () => {
105 if (_prevMessage === undefined) return;
106 if (isCI) output.write('\n');
107 const wrapped = wrapAnsi(_prevMessage, columns, {
108 hard: true,
109 trim: false,
110 });
111 const prevLines = wrapped.split('\n');
112 if (prevLines.length > 1) {
113 output.write(cursor.up(prevLines.length - 1));
114 }
115 output.write(cursor.to(0));
116 output.write(erase.down());
117 };
118
119 const removeTrailingDots = (msg: string): string => {
120 return msg.replace(/\.+$/, '');

Callers 2

startFunction · 0.85
_stopFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected