csv-array
Advanced tools
Comparing version 0.0.19 to 0.0.22
@@ -66,19 +66,18 @@ module.exports = { | ||
readStream.pause(); | ||
setTimeout(function () { | ||
if(tempLineCounter == 0) { | ||
tempAttributeNameArray = line.split(","); | ||
if(!considerFirstRowAsHeading) { | ||
if(tempAttributeNameArray.length == 1) { | ||
tempDataArray.push(line); | ||
} else { | ||
tempDataArray.push(tempAttributeNameArray); | ||
} | ||
if(tempLineCounter == 0) { | ||
tempAttributeNameArray = line.split(","); | ||
if(!considerFirstRowAsHeading) { | ||
if(tempAttributeNameArray.length == 1) { | ||
tempDataArray.push(line); | ||
} else { | ||
tempDataArray.push(tempAttributeNameArray); | ||
} | ||
tempLineCounter = 1; | ||
} else { | ||
tempDataArray.push(presentObject.buildOutputData(tempAttributeNameArray, line, considerFirstRowAsHeading)); | ||
} | ||
readStream.resume(); | ||
}, 2); | ||
tempLineCounter = 1; | ||
} else { | ||
tempDataArray.push(presentObject.buildOutputData(tempAttributeNameArray, line, considerFirstRowAsHeading)); | ||
} | ||
readStream.resume(); | ||
@@ -85,0 +84,0 @@ }); |
{ | ||
"name": "csv-array", | ||
"version": "0.0.19", | ||
"version": "0.0.22", | ||
"description": "Intelligent CSV parser created and made for nodeJS. Which takes a csv file and produce an array from it.", | ||
@@ -12,11 +12,11 @@ "main": "csv-array.js", | ||
"keywords": [ | ||
"csv", | ||
"array", | ||
"csv-array", | ||
"parsing", | ||
"parse csv", | ||
"convert csv", | ||
"json", | ||
"parser", | ||
"streaming" | ||
"csv", | ||
"array", | ||
"csv-array", | ||
"parsing", | ||
"parse csv", | ||
"convert csv", | ||
"json", | ||
"parser", | ||
"streaming" | ||
], | ||
@@ -27,4 +27,5 @@ "author": "Sahasrangshu Guha", | ||
"dependencies": { | ||
"fs": "0.0.2", | ||
"line-by-line": "~0.1.3" | ||
} | ||
} |
@@ -8,6 +8,3 @@ #csv-array | ||
## Change log | ||
* Reduced number of variables used | ||
* Added option to "considerFirstRowAsHeading". See Usage Guide for details about using | ||
* Bug fix in data parsing | ||
* Truncation of data problem solved | ||
* Dramatic improvement in speed.. Please forget version 0.0.1x | ||
@@ -168,1 +165,2 @@ | ||
``` | ||
If any issue found feel free to contact me at sguha1988.life@gmail.com |
8902
2
99
165