* Writes a string to stdout. * @param str The string to write.
(str: string)
| 24 | * @param str The string to write. |
| 25 | */ |
| 26 | write(str: string): void { |
| 27 | if (str.length === 0) { |
| 28 | return; |
| 29 | } |
| 30 | this.outputStream.write(str); |
| 31 | const strippedStr = stripAnsi(str); |
| 32 | if (strippedStr.length > 0) { |
| 33 | this.atStartOfLine = strippedStr.endsWith('\n'); |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | /** |
| 38 | * Writes a string to stdout, ensuring it starts on a new line. |
no outgoing calls