(prompt: string, columns: number)
| 1610 | } |
| 1611 | |
| 1612 | const lines = (prompt: string, columns: number): number => { |
| 1613 | const lines = prompt.split(NEWLINE_REGEXP) |
| 1614 | return columns === 0 |
| 1615 | ? lines.length |
| 1616 | : pipe( |
| 1617 | Arr.map(lines, (line) => Math.ceil(line.length / columns)), |
| 1618 | Arr.reduce(0, (left, right) => left + right) |
| 1619 | ) |
| 1620 | } |
| 1621 | |
| 1622 | const clearOutputWithError = (outputText: string, columns: number, errorText?: string): string => { |
| 1623 | if (errorText !== undefined && errorText.length > 0) { |
no test coverage detected