Skip to content

cleanCommandOutput

Turns a command’s captured output into plain text a PR body can quote: terminal control sequences are removed, whether they arrived as ESC bytes or as their caret-rendered ^[[...m text, and a line a progress display rewrote with \r keeps only its last state.

Import:

import { cleanCommandOutput } from '@mnaoumov/typescript-dev-toolkit/upstream-sync';

Signature:

function cleanCommandOutput(output: string): string

Parameters:

Parameter Type Description
output string The captured output.

Returns: string — The plain text.