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

Function read

benchmark/streams/iter-throughput-identity.js:40–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38 remaining = datasize;
39 const r = new Readable({
40 read() {
41 if (remaining <= 0) {
42 this.push(null);
43 return;
44 }
45 const size = Math.min(remaining, chunk.length);
46 remaining -= size;
47 this.push(size === chunk.length ? chunk : chunk.subarray(0, size));
48 },
49 });
50 const w = new Writable({
51 write(data, enc, cb) { cb(); },

Callers

nothing calls this directly

Calls 2

pushMethod · 0.45
minMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…