MCPcopy Create free account
hub / github.com/UI5/webcomponents / onEofChunk

Function onEofChunk

packages/main/test/pages/diffable-html.js:6551–6564  ·  view source on GitHub ↗
(stream, state)

Source from the content-addressed store, hash-verified

6549 };
6550
6551 function onEofChunk(stream, state) {
6552 if (state.ended) return;
6553 if (state.decoder) {
6554 var chunk = state.decoder.end();
6555 if (chunk && chunk.length) {
6556 state.buffer.push(chunk);
6557 state.length += state.objectMode ? 1 : chunk.length;
6558 }
6559 }
6560 state.ended = true;
6561
6562 // emit 'readable' now to make sure it gets picked up.
6563 emitReadable(stream);
6564 }
6565
6566 // Don't emit readable right away in sync mode, because this can trigger
6567 // another read() call => stack overflow. This way, it might trigger

Callers 1

readableAddChunkFunction · 0.85

Calls 3

emitReadableFunction · 0.85
endMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…