(stream, state)
| 24554 | } |
| 24555 | |
| 24556 | function onEofChunk(stream, state) { |
| 24557 | if (state.ended) return; |
| 24558 | if (state.decoder) { |
| 24559 | var chunk = state.decoder.end(); |
| 24560 | if (chunk && chunk.length) { |
| 24561 | state.buffer.push(chunk); |
| 24562 | state.length += state.objectMode ? 1 : chunk.length; |
| 24563 | } |
| 24564 | } |
| 24565 | state.ended = true; |
| 24566 | |
| 24567 | // emit 'readable' now to make sure it gets picked up. |
| 24568 | emitReadable(stream); |
| 24569 | } |
| 24570 | |
| 24571 | // Don't emit readable right away in sync mode, because this can trigger |
| 24572 | // another read() call => stack overflow. This way, it might trigger |
no test coverage detected