MCPcopy
hub / github.com/exceljs/exceljs / end

Function end

lib/utils/stream-buf.js:283–300  ·  view source on GitHub ↗
(chunk, encoding, callback)

Source from the content-addressed store, hash-verified

281 this._flush();
282 },
283 end(chunk, encoding, callback) {
284 const writeComplete = error => {
285 if (error) {
286 callback(error);
287 } else {
288 this._flush();
289 this.pipes.forEach(pipe => {
290 pipe.end();
291 });
292 this.emit('finish');
293 }
294 };
295 if (chunk) {
296 this.write(chunk, encoding, writeComplete);
297 } else {
298 writeComplete();
299 }
300 },
301
302 // readable
303 // event readable - some data is now available

Callers

nothing calls this directly

Calls 2

writeCompleteFunction · 0.85
writeMethod · 0.65

Tested by

no test coverage detected