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

Method resume

test/parallel/test-zlib.js:135–154  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

133 }
134
135 resume() {
136 const emit = () => {
137 if (this.paused) return;
138 if (this.offset >= this.length) {
139 this.ended = true;
140 return this.emit('end');
141 }
142 const end = Math.min(this.offset + this.trickle, this.length);
143 const c = this.chunk.slice(this.offset, end);
144 this.offset += c.length;
145 this.emit('data', c);
146 process.nextTick(emit);
147 };
148
149 if (this.ended) return;
150 this.emit('resume');
151 if (!this.chunk) return;
152 this.paused = false;
153 emit();
154 }
155
156 end(chunk) {
157 // Walk over the chunk in blocks.

Callers 1

endMethod · 0.95

Calls 2

emitMethod · 0.95
emitFunction · 0.50

Tested by

no test coverage detected