MCPcopy
hub / github.com/adaltas/node-csv / _flush

Method _flush

packages/csv-stringify/lib/index.js:44–56  ·  view source on GitHub ↗
(callback)

Source from the content-addressed store, hash-verified

42 callback(err);
43 }
44 _flush(callback) {
45 if (this.state.stop === true) {
46 // Note, Node.js 12 call flush even after an error, we must prevent
47 // `callback` from being called in flush without any error.
48 return;
49 }
50 if (this.info.records === 0) {
51 this.api.bom(this.push.bind(this));
52 const err = this.api.headers(this.push.bind(this));
53 if (err) callback(err);
54 }
55 callback();
56 }
57}
58
59const stringify = function () {

Callers

nothing calls this directly

Calls 1

callbackFunction · 0.85

Tested by

no test coverage detected