Comparing version 0.5.0 to 0.5.1
@@ -168,16 +168,20 @@ var extended = require("../extended"), | ||
_parse: function _parseLine(data, hasMoreData, cb) { | ||
var row, count, ret, rows, self = this; | ||
var rows, self = this; | ||
try { | ||
data = this.parser(data, hasMoreData); | ||
rows = data.rows; | ||
if (!this._parsedHeaders) { | ||
this.__processHeaders(rows, function (err) { | ||
if (err) { | ||
cb(err); | ||
} else { | ||
self.__processRows(rows, data, cb); | ||
} | ||
}); | ||
if (rows.length) { | ||
if (!this._parsedHeaders) { | ||
this.__processHeaders(rows, function (err) { | ||
if (err) { | ||
cb(err); | ||
} else { | ||
self.__processRows(rows, data, cb); | ||
} | ||
}); | ||
} else { | ||
this.__processRows(rows, data, cb); | ||
} | ||
} else { | ||
this.__processRows(rows, data, cb); | ||
cb(null, data.line); | ||
} | ||
@@ -184,0 +188,0 @@ } catch (e) { |
{ | ||
"name": "fast-csv", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "CSV parser and writer", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
126719
928
0