MCPcopy Index your code
hub / github.com/nodejs/node / #pullFromSource

Method #pullFromSource

lib/internal/streams/iter/share.js:590–607  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

588 }
589
590 #pullFromSource() {
591 if (this.#sourceExhausted || this.#cancelled) return;
592
593 try {
594 this.#sourceIterator ||= this.#source[SymbolIterator]();
595
596 const result = this.#sourceIterator.next();
597
598 if (result.done) {
599 this.#sourceExhausted = true;
600 } else {
601 this.#buffer.push(result.value);
602 }
603 } catch (error) {
604 this.#sourceError = wrapError(error);
605 this.#sourceExhausted = true;
606 }
607 }
608
609 #tryTrimBuffer() {
610 if (this.#cachedMinCursorConsumers === 0) {

Callers

nothing calls this directly

Calls 3

wrapErrorFunction · 0.85
nextMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected