MCPcopy Index your code
hub / github.com/angular/angular-cli / processStreamLines

Function processStreamLines

packages/angular/cli/src/commands/mcp/host.ts:392–407  ·  view source on GitHub ↗
(
  stream: NodeJS.ReadableStream | undefined | null,
  lineCallback: (line: string) => void,
)

Source from the content-addressed store, hash-verified

390 * and preserving leading indentation.
391 */
392export function processStreamLines(
393 stream: NodeJS.ReadableStream | undefined | null,
394 lineCallback: (line: string) => void,
395): void {
396 if (!stream) {
397 return;
398 }
399
400 const rl = createInterface({ input: stream, terminal: false });
401 rl.on('line', (line) => {
402 const cleanLine = stripVTControlCharacters(line).trimEnd();
403 if (cleanLine.length > 0) {
404 lineCallback(cleanLine);
405 }
406 });
407}

Callers 2

startMethod · 0.90
host.tsFile · 0.85

Calls 1

onMethod · 0.80

Tested by

no test coverage detected