MCPcopy Index your code
hub / github.com/nodejs/node / pull

Function pull

deps/undici/undici.js:1962–1978  ·  view source on GitHub ↗
(controller)

Source from the content-addressed store, hash-verified

1960 iterator = iterable[Symbol.asyncIterator]();
1961 },
1962 pull(controller) {
1963 return iterator.next().then(({ done, value }) => {
1964 if (done) {
1965 return queueMicrotask(() => {
1966 controller.close();
1967 controller.byobRequest?.respond(0);
1968 });
1969 } else {
1970 const buf = Buffer.isBuffer(value) ? value : Buffer.from(value);
1971 if (buf.byteLength) {
1972 return controller.enqueue(new Uint8Array(buf));
1973 } else {
1974 return this.pull(controller);
1975 }
1976 }
1977 });
1978 },
1979 cancel() {
1980 return iterator.return();
1981 },

Callers

nothing calls this directly

Calls 8

queueMicrotaskFunction · 0.85
nextMethod · 0.65
closeMethod · 0.65
thenMethod · 0.45
respondMethod · 0.45
fromMethod · 0.45
enqueueMethod · 0.45
pullMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…