|
@ -149,7 +149,7 @@ class File extends EventEmitter { |
|
|
}) |
|
|
}) |
|
|
.on('data', (row) => { |
|
|
.on('data', (row) => { |
|
|
// Emit a parse.data event with the url, filepath and data
|
|
|
// 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 = []; |
|
|
let result = []; |
|
|
if ( i === 0 ) { |
|
|
if ( i === 0 ) { |
|
@ -174,7 +174,7 @@ class File extends EventEmitter { |
|
|
}) |
|
|
}) |
|
|
.on('end', () => { |
|
|
.on('end', () => { |
|
|
// Emit a parse.end event with the url and filepath
|
|
|
// 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(); |
|
|
stream.end(); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|