csv-batch
Advanced tools
Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "csv-batch", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Fast CSV parser that can batch events, reduce on rows, and no dependencies", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -56,3 +56,3 @@ # CSV Parser with Batching | ||
csvBatch(fileStream, { | ||
reducerStart: {} | ||
getInitialValue: () => ({}), | ||
reducer: (current, record) => { | ||
@@ -59,0 +59,0 @@ if (!current[record.month]) { |
@@ -286,3 +286,5 @@ 'use strict'; | ||
} | ||
await doBatching(options, context, batchResults); | ||
if (options.batch && context.batchRecords > 0) { | ||
await getBatch(options, context, batchResults); | ||
} | ||
if (!options.batch) { | ||
@@ -289,0 +291,0 @@ batchResults.data = context.batch; |
17739
324