MCPcopy Create free account
hub / github.com/nodejs/node / writeChunk

Method writeChunk

test/fixtures/wpt/streams/resources/rs-utils.js:68–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

66
67 const source = this;
68 function writeChunk() {
69 if (source.paused) {
70 return;
71 }
72
73 source.pushed++;
74
75 if (source.toPush > 0 && source.pushed > source.toPush) {
76 if (source._intervalHandle) {
77 localClearInterval(source._intervalHandle);
78 source._intervalHandle = undefined;
79 }
80 source.closed = true;
81 source.onend();
82 } else {
83 source.ondata(randomChunk(128));
84 }
85 }
86 }
87
88 readStop() {

Callers

nothing calls this directly

Calls 2

randomChunkFunction · 0.85
ondataMethod · 0.80

Tested by

no test coverage detected