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

Function pull

benchmark/streams/iter-throughput-pipeto.js:63–69  ·  view source on GitHub ↗
(controller)

Source from the content-addressed store, hash-verified

61 let remaining = datasize;
62 const rs = new ReadableStream({
63 pull(controller) {
64 if (remaining <= 0) { controller.close(); return; }
65 const size = Math.min(remaining, chunk.length);
66 remaining -= size;
67 controller.enqueue(
68 size === chunk.length ? chunk : chunk.subarray(0, size));
69 },
70 });
71 const ws = new WritableStream({ write() {} });
72 await rs.pipeTo(ws);

Callers

nothing calls this directly

Calls 3

closeMethod · 0.65
minMethod · 0.45
enqueueMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…