MCPcopy
hub / github.com/di-sukharev/opencommit / consumeStart

Function consumeStart

out/cli.cjs:56210–56228  ·  view source on GitHub ↗
(consume2)

Source from the content-addressed store, hash-verified

56208 }).on("close", function() {
56209 if (this[kConsume].body !== null) {
56210 consumeFinish(this[kConsume], new RequestAbortedError());
56211 }
56212 });
56213 process.nextTick(consumeStart, stream4[kConsume]);
56214 });
56215 }
56216 function consumeStart(consume2) {
56217 if (consume2.body === null) {
56218 return;
56219 }
56220 const { _readableState: state2 } = consume2.stream;
56221 for (const chunk of state2.buffer) {
56222 consumePush(consume2, chunk);
56223 }
56224 if (state2.endEmitted) {
56225 consumeEnd(this[kConsume]);
56226 } else {
56227 consume2.stream.on("end", function() {
56228 consumeEnd(this[kConsume]);
56229 });
56230 }
56231 consume2.stream.resume();

Callers

nothing calls this directly

Calls 5

consumePushFunction · 0.85
consumeEndFunction · 0.85
resumeMethod · 0.80
onMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…