csv-streamify
Advanced tools
Comparing version 0.3.2 to 0.4.0
@@ -28,4 +28,4 @@ var Transform = require('stream').Transform, | ||
if (!Iconv) throw new Error('Please "npm install node-iconv"') | ||
this.iconv = new Iconv(opts.encoding, 'UTF-8') | ||
;delete opts.encoding | ||
this.iconv = new Iconv(opts.encoding, 'UTF-8'); | ||
delete opts.encoding | ||
} | ||
@@ -44,2 +44,3 @@ | ||
this.empty = opts.hasOwnProperty('empty') ? opts.empty : '' | ||
this.objectMode = opts.objectMode || false | ||
@@ -89,4 +90,9 @@ // state | ||
// emit the parsed line array as a string | ||
this.push(JSON.stringify(this.line)) | ||
// emit the parsed line as an array if in object mode | ||
// or as a stringified array (default) | ||
if (this.objectMode) { | ||
this.push(this.line) | ||
} else { | ||
this.push(JSON.stringify(this.line)) | ||
} | ||
@@ -93,0 +99,0 @@ if (this.cb) this.body.push(this.line) |
{ | ||
"name": "csv-streamify", | ||
"version": "0.3.2", | ||
"version": "0.4.0", | ||
"description": "Streaming CSV Parser. Made entirely out of streams.", | ||
@@ -19,3 +19,3 @@ "author": "Clemens Stolle", | ||
], | ||
"license": "WTFPL", | ||
"license": "BSD", | ||
"devDependencies": { | ||
@@ -22,0 +22,0 @@ "mocha": "1.8.x", |
Sorry, the diff of this file is not supported yet
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
6605
96
1
73