diff --git a/src/models/file.js b/src/models/file.js index e775916..5a0122e 100644 --- a/src/models/file.js +++ b/src/models/file.js @@ -149,7 +149,7 @@ class File extends EventEmitter { }) .on('data', (row) => { // Emit a parse.data event with the url, filepath and data - this.emit('parse.data', { url: this.url, filepath: this.filepath, data: row }); + this.emit('parse.data', { url: this.url, filepath: this.filepath, data: row, index: i }); let result = []; if ( i === 0 ) { @@ -174,7 +174,7 @@ class File extends EventEmitter { }) .on('end', () => { // Emit a parse.end event with the url and filepath - this.emit('parse.end', { url: this.url, filepath: this.filepath }); + this.emit('parse.end', { url: this.url, filepath: this.filepath, count: i }); stream.end(); });