(prompt: string, columns: number)
| 1430 | } |
| 1431 | |
| 1432 | const lines = (prompt: string, columns: number): number => { |
| 1433 | const lines = prompt.split(NEWLINE_REGEXP) |
| 1434 | return columns === 0 |
| 1435 | ? lines.length |
| 1436 | : pipe( |
| 1437 | Arr.map(lines, (line) => Math.ceil(line.length / columns)), |
| 1438 | Arr.reduce(0, (left, right) => left + right) |
| 1439 | ) |
| 1440 | } |
| 1441 | |
| 1442 | const clearOutputWithError = (outputText: string, columns: number, errorText?: string): string => { |
| 1443 | if (errorText !== undefined && errorText.length > 0) { |
no test coverage detected