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

Function addChunk

packages/main/test/pages/diffable-html.js:6366–6378  ·  view source on GitHub ↗
(stream, state, chunk, addToFront)

Source from the content-addressed store, hash-verified

6364 }
6365
6366 function addChunk(stream, state, chunk, addToFront) {
6367 if (state.flowing && state.length === 0 && !state.sync) {
6368 stream.emit('data', chunk);
6369 stream.read(0);
6370 } else {
6371 // update the buffer info.
6372 state.length += state.objectMode ? 1 : chunk.length;
6373 if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
6374
6375 if (state.needReadable) emitReadable(stream);
6376 }
6377 maybeReadMore(stream, state);
6378 }
6379
6380 function chunkInvalid(state, chunk) {
6381 var er;

Callers 1

readableAddChunkFunction · 0.85

Calls 3

emitReadableFunction · 0.85
maybeReadMoreFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…