Comparing version 0.6.0 to 1.0.0
@@ -19,2 +19,9 @@ var fs = require("fs"), | ||
options.objectMode = true; | ||
if (has(options, "transform")) { | ||
// remove so its not set to _transform in Transform constructor | ||
options.consumerTransform = options.transform; | ||
delete options.transform; | ||
} | ||
Transform.call(this, options); | ||
@@ -37,3 +44,3 @@ this.formatter = createFormatter(options, this); | ||
this.includeEndRowDelimiter = !!options.includeEndRowDelimiter, | ||
has(options, "transform") && this.transform(options.transform); | ||
has(options, "consumerTransform") && this.transform(options.consumerTransform); | ||
} | ||
@@ -88,2 +95,2 @@ util.inherits(CsvTransformStream, Transform); | ||
module.exports = CsvTransformStream; | ||
module.exports = CsvTransformStream; |
@@ -80,2 +80,2 @@ var fs = require("fs"), | ||
createWriteStream.writeToStream = writeToStream; | ||
module.exports = createWriteStream; | ||
module.exports = createWriteStream; |
@@ -187,3 +187,2 @@ var extended = require("../extended"), | ||
__emitRecord: function (dataRow, count) { | ||
this.emit("record", dataRow, count); | ||
if (this._emitData) { | ||
@@ -344,2 +343,2 @@ this.push(this.__objectMode ? dataRow : JSON.stringify(dataRow)); | ||
module.exports = ParserStream; | ||
module.exports = ParserStream; |
{ | ||
"name": "fast-csv", | ||
"version": "0.6.0", | ||
"version": "1.0.0", | ||
"description": "CSV parser and writer", | ||
@@ -25,4 +25,4 @@ "main": "index.js", | ||
"devDependencies": { | ||
"it": "~0.2.6", | ||
"grunt-it": "~0.3.1", | ||
"it": "^1.0.1", | ||
"grunt-it": "^1.0.0", | ||
"grunt": "~0.4.1", | ||
@@ -33,3 +33,3 @@ "grunt-contrib-jshint": "~0.10.0", | ||
"engines": { | ||
"node": ">=0.10" | ||
"node": ">=4.0.0" | ||
}, | ||
@@ -36,0 +36,0 @@ "dependencies": { |
@@ -38,3 +38,2 @@ [![build status](https://secure.travis-ci.org/C2FO/fast-csv.png)](http://travis-ci.org/C2FO/fast-csv) | ||
* `data`: Emitted when a record is parsed. | ||
* `record`: Emitted when a record is parsed. **DEPRECATED** | ||
* `data-invalid`: Emitted if there was invalid row encounted, **only emitted if the `validate` function is used or `strictColumnHandling=true`**. | ||
@@ -630,3 +629,3 @@ * `data`: Emitted with the object or `stringified` version if the `objectMode` is set to `false`. | ||
csv | ||
.writeToStream("my.csv", [ | ||
.writeToPath("my.csv", [ | ||
{a: "a1", b: "b1"}, | ||
@@ -642,3 +641,3 @@ {a: "a2", b: "b2"} | ||
csv | ||
.writeToStream("my.csv", [ | ||
.writeToPath("my.csv", [ | ||
{a: "a1", b: "b1"}, | ||
@@ -645,0 +644,0 @@ {a: "a2", b: "b2"} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
929
1
60775
16
835
1