INNER CODE UNIT · JavaScript
Parser
adaltas/node-csv · packages/csv-parse/lib/index.js:14
class Parser extends Transform {
constructor(opts = {}) {
super({ ...{ readableObjectMode: true }, ...opts, encoding: null });
this.api = transform({
on_skip: (err, chunk) => {
this.emit("skip", err, chunk);
},
...opts,
});
// Backward compatibility
this.state = this.api.state;
this.options = this.api.options;
this.info = this.api.info;
}
// Implementation of `Transform._transform`
_transform(buf, _, callback) {
if (this.state.stop === true) {
return;