csv-parser
Advanced tools
Comparing version 1.4.4 to 1.4.5
@@ -37,2 +37,4 @@ var stream = require('stream') | ||
Parser.prototype._transform = function(data, enc, cb) { | ||
if (typeof data === 'string') data = new Buffer(data) | ||
var start = 0 | ||
@@ -39,0 +41,0 @@ var buf = data |
{ | ||
"name": "csv-parser", | ||
"version": "1.4.4", | ||
"version": "1.4.5", | ||
"description": "Streaming csv parser inspired by binary-csv that aims to be faster than everyone else", | ||
@@ -5,0 +5,0 @@ "repository": "mafintosh/csv-parser", |
@@ -21,2 +21,15 @@ var test = require('tape') | ||
test('supports strings', function(t) { | ||
var parser = csv() | ||
parser.on('data', function(data) { | ||
t.same(data, {hello:'world'}) | ||
t.end() | ||
}) | ||
parser.write('hello\n') | ||
parser.write('world\n') | ||
parser.end() | ||
}) | ||
test('newlines in a cell', function(t) { | ||
@@ -23,0 +36,0 @@ collect('newlines.csv', verify) |
14015
384