csv-batch
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "csv-batch", | ||
"version": "1.0.0", | ||
"description": "Fastest CSV parser that have a batch event and no dependencies", | ||
"version": "1.0.1", | ||
"description": "Fast CSV parser that have a batch event and no dependencies", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "eslint . && nyc --reporter=html --reporter=text-summary mocha --recursive --timeout 5000" | ||
"test": "eslint . && nyc --reporter=html --reporter=text-summary mocha --recursive --timeout 10000" | ||
}, | ||
@@ -17,3 +17,6 @@ "repository": { | ||
"fast", | ||
"batch" | ||
"batch", | ||
"tsv", | ||
"parse", | ||
"json" | ||
], | ||
@@ -32,2 +35,3 @@ "author": "JT Turner <jtwebman@gmail.com> (https://jtwebman.com)", | ||
"eslint-plugin-prettier": "^3.1.1", | ||
"lodash": "^4.17.15", | ||
"mocha": "^6.2.2", | ||
@@ -37,3 +41,6 @@ "nyc": "^14.1.1", | ||
}, | ||
"dependencies": {} | ||
"dependencies": {}, | ||
"engines": { | ||
"node": ">=8.16.2" | ||
} | ||
} |
# CSV Parser with Batching | ||
[![Build Status](https://travis-ci.org/jtwebman/csv-batch.svg?branch=master)](https://travis-ci.org/jtwebman/csv-batch) | ||
[![Coverage Status](https://coveralls.io/repos/github/jtwebman/csv-batch/badge.svg?branch=master)](https://coveralls.io/github/jtwebman/csv-batch?branch=master) | ||
[![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://opensource.org/licenses/mit-license.php) | ||
[![node](https://img.shields.io/node/v/csv-batch.svg)](https://www.npmjs.org/package/csv-batch) | ||
[![Known Vulnerabilities](https://snyk.io/test/github/jtwebman/csv-batch/badge.svg)](https://snyk.io/test/github/jtwebman/csv-batch) | ||
This is a very fast CSV parser with batching for Node.js. It has no dependencies and is returns a promise and functions support promises and async functions so no need to learn streams! | ||
@@ -4,0 +10,0 @@ |
@@ -297,3 +297,3 @@ 'use strict'; | ||
if (batchTasks.length > 0) { | ||
Promise.all(batchTasks).finally(() => { | ||
Promise.all(batchTasks).then(() => { | ||
callback(); | ||
@@ -312,3 +312,3 @@ }); | ||
batchResults.totalRecords = batchResults.totalRecords + context.batch.length; | ||
getBatchPromise(options, context, batchResults).finally(() => { | ||
getBatchPromise(options, context, batchResults).then(() => { | ||
this.emit('results', batchResults); | ||
@@ -315,0 +315,0 @@ callback(); |
17199
85
9