| 23 | // overridden function with same signature |
| 24 | // eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 25 | _transform(chunk: any, _encoding: string, callback: TransformCallback): void { |
| 26 | this.buffer = this.buffer.concat(chunk.toString()); |
| 27 | if (this.sep === undefined) { |
| 28 | // try to detect the separator if not provided |
| 29 | this.sep = detect(this.buffer); |
| 30 | } |
| 31 | |
| 32 | const csv = new Parser(this.buffer, this.sep, this.quo); |
| 33 | const rows = csv.File(); |
| 34 | |
| 35 | if (csv.linePointer !== csv.pointer) { |
| 36 | rows.pop(); |
| 37 | } |
| 38 | this.buffer = this.buffer.slice(csv.linePointer); |
| 39 | if (rows.length > 0) { |
| 40 | rows.forEach((row) => { |
| 41 | this.push(row); |
| 42 | }); |
| 43 | } |
| 44 | callback(); |
| 45 | } |
| 46 | |
| 47 | // TODO |
| 48 | /* |