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

Method emit

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

Source from the content-addressed store, hash-verified

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');

Callers 15

pauseMethod · 0.95
resumeMethod · 0.95
writeMethod · 0.45
endMethod · 0.45
endMethod · 0.45
flushParagraphMethod · 0.45
writeMethod · 0.45
endMethod · 0.45
writeMethod · 0.45
endMethod · 0.45
emitHeaderMethod · 0.45
emitFooterMethod · 0.45

Calls 2

sliceMethod · 0.65
minMethod · 0.45

Tested by 1

testFunction · 0.36