(chunk)
| 78 | |
| 79 | let pending = '' |
| 80 | const handleData = (chunk) => { |
| 81 | pending += chunk.toString() |
| 82 | const lines = pending.split('\n') |
| 83 | pending = lines.pop() ?? '' |
| 84 | lines.forEach((line) => { |
| 85 | if (line.length > 0) { |
| 86 | console.log(`${prefix} ${line}`) |
| 87 | } |
| 88 | }) |
| 89 | } |
| 90 | |
| 91 | stream.on('data', handleData) |
| 92 |
nothing calls this directly
no outgoing calls
no test coverage detected