Comparing version 1.0.3 to 1.0.4
@@ -53,7 +53,10 @@ var es = require('event-stream'); | ||
var label = field.label || field.field | ||
if (line) | ||
if (line === 'START') { | ||
line = ''; | ||
} else { | ||
line += this.fieldSeparator | ||
} | ||
line += self.prepValue(label) | ||
return line | ||
}, '', this) | ||
}, 'START', this) | ||
header += '\r\n' | ||
@@ -67,5 +70,7 @@ return header | ||
var label = field.label || field.field | ||
if (line) | ||
if (line === 'START') { | ||
line = ''; | ||
} else { | ||
line += this.fieldSeparator | ||
} | ||
var val = self.getValue(data, field.name) | ||
@@ -80,3 +85,3 @@ if (field.filter) { | ||
return line | ||
}, '', this) | ||
}, 'START', this) | ||
@@ -83,0 +88,0 @@ row += '\r\n' |
{ | ||
"name": "json-csv", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Export a richly structured, JSON array to CSV", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/IWSLLC/json-csv", |
19934
15
310