(input: string)
| 240 | let bytes = 0 |
| 241 | let next: number | undefined |
| 242 | const append = (input: string) => { |
| 243 | if (line < offset) { |
| 244 | line++ |
| 245 | return true |
| 246 | } |
| 247 | if (lines.length >= limit || bytes >= MAX_READ_BYTES) { |
| 248 | next = line |
| 249 | return false |
| 250 | } |
| 251 | const text = input.length > MAX_LINE_LENGTH ? input.slice(0, MAX_LINE_LENGTH) + MAX_LINE_SUFFIX : input |
| 252 | const size = Buffer.byteLength(text, "utf-8") + (lines.length > 0 ? 1 : 0) |
| 253 | if (bytes + size > MAX_READ_BYTES) { |
| 254 | next = line |
| 255 | return false |
| 256 | } |
| 257 | lines.push(text) |
| 258 | bytes += size |
| 259 | line++ |
| 260 | return true |
| 261 | } |
| 262 | const consume = (input: string) => { |
| 263 | let text = input |
| 264 | while (true) { |
no test coverage detected