csv-streamify
Advanced tools
Comparing version 3.0.4 to 4.0.0
@@ -0,1 +1,8 @@ | ||
4.0.0 / 2018-03-25 | ||
================== | ||
* BREAKING: make `objectMode: true` the default. The parser now emits objects/arrays per line instead of buffers. | ||
* drop support for old, unsupported node versions (0.12, 5) and test in node 8 and 9. | ||
* update dependencies | ||
3.0.4 / 2016-05-24 | ||
@@ -2,0 +9,0 @@ ================== |
@@ -5,2 +5,14 @@ 'use strict' | ||
/** | ||
* Creates the CSV parser | ||
* | ||
* @param {object} opts Options object | ||
* @param {string} [opts.delimiter=','] The delimiter character | ||
* @param {string} [opts.newline='\n'] The newline character | ||
* @param {string} [opts.quote='"'] The quote character | ||
* @param {string} [opts.empty=''] Which character to return for empty fields | ||
* @param {boolean} [opts.objectMode=true] Whether to return an object or a buffer per line | ||
* @param {boolean} [opts.columns=false] Whether to parse headers | ||
* @param {function} [cb] Callback function | ||
*/ | ||
module.exports = function (opts, cb) { | ||
@@ -18,3 +30,3 @@ if (typeof opts === 'function') { | ||
opts.empty = opts.hasOwnProperty('empty') ? opts.empty : '' | ||
opts.objectMode = opts.objectMode || false | ||
opts.objectMode = 'objectMode' in opts ? opts.objectMode : true | ||
opts.hasColumns = opts.columns || false | ||
@@ -21,0 +33,0 @@ |
{ | ||
"name": "csv-streamify", | ||
"version": "3.0.4", | ||
"version": "4.0.0", | ||
"description": "Streaming CSV Parser. Made entirely out of streams.", | ||
@@ -11,3 +11,4 @@ "author": "Clemens Stolle", | ||
"scripts": { | ||
"test": "standard && mocha -R spec" | ||
"pretest": "standard", | ||
"test": "mocha -R spec" | ||
}, | ||
@@ -26,13 +27,17 @@ "bin": { | ||
"dependencies": { | ||
"through2": "2.0.1" | ||
"through2": "2.0.3" | ||
}, | ||
"devDependencies": { | ||
"csv-spectrum": "^1.0.0", | ||
"mocha": "^2.3.3", | ||
"standard": "^7.1.0", | ||
"mocha": "^5.0.5", | ||
"standard": "^11.0.1", | ||
"string-to-stream": "^1.0.1" | ||
}, | ||
"engines": { | ||
"node": ">=0.12.0" | ||
} | ||
"node": ">=4" | ||
}, | ||
"files": [ | ||
"csv-streamify.js", | ||
"cli.js" | ||
] | ||
} |
@@ -1,3 +0,4 @@ | ||
csv-streamify [![Build Status](https://travis-ci.org/klaemo/csv-stream.svg?branch=master)](https://travis-ci.org/klaemo/csv-stream) | ||
csv-streamify [![Build Status](https://travis-ci.org/klaemo/csv-stream.svg?branch=master)](https://travis-ci.org/klaemo/csv-stream) [![Greenkeeper badge](https://badges.greenkeeper.io/klaemo/csv-stream.svg)](https://greenkeeper.io/) | ||
=== | ||
[![NPM](https://nodei.co/npm/csv-streamify.png?downloadRank=true)](https://nodei.co/npm/csv-streamify/) | ||
@@ -8,3 +9,3 @@ | ||
Works in node `0.12`, `4`, `5` and `6`. Might work in node `0.10`, but is not tested in it. | ||
Works in node `4`, `6`, `8` and `9`. Might work in earlier versions, but is not tested in it. | ||
@@ -11,0 +12,0 @@ ## Installation |
12223
33086
164
112
6
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedthrough2@2.0.3(transitive)
- Removedprocess-nextick-args@1.0.7(transitive)
- Removedreadable-stream@2.0.6(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedthrough2@2.0.1(transitive)
Updatedthrough2@2.0.3