csv-stringify
Advanced tools
Comparing version 5.3.5 to 5.3.6
# Changelog | ||
## Version 5.3.6 | ||
* cast: fix header context property on first record | ||
## Version 5.3.5 | ||
@@ -5,0 +9,0 @@ |
@@ -433,2 +433,3 @@ "use strict"; | ||
value: function stringify(chunk) { | ||
var chunkIsHeader = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; | ||
var column, columns, containsEscape, containsQuote, containsRowDelimiter, containsdelimiter, csvrecord, delimiter, err, escape, field, header, i, j, l, len, m, options, quote, quoted, quotedMatch, quotedString, quoted_empty, quoted_match, quoted_string, record, record_delimiter, ref, ref1, regexp, shouldQuote, value; | ||
@@ -460,3 +461,3 @@ | ||
records: this.info.records, | ||
header: header && this.info.records === 0 | ||
header: chunkIsHeader | ||
}); | ||
@@ -486,3 +487,3 @@ | ||
records: this.info.records, | ||
header: header && this.info.records === 0 | ||
header: chunkIsHeader | ||
}); | ||
@@ -510,3 +511,3 @@ | ||
records: this.info.records, | ||
header: header && this.info.records === 0 | ||
header: chunkIsHeader | ||
}); | ||
@@ -634,3 +635,3 @@ | ||
if (this.options.eof) { | ||
headers = this.stringify(headers) + this.options.record_delimiter; | ||
headers = this.stringify(headers, true) + this.options.record_delimiter; | ||
} else { | ||
@@ -637,0 +638,0 @@ headers = this.stringify(headers); |
@@ -337,3 +337,3 @@ // Generated by CoffeeScript 2.4.1 | ||
// Convert a line to a string. Line may be an object, an array or a string. | ||
stringify(chunk) { | ||
stringify(chunk, chunkIsHeader = false) { | ||
var column, columns, containsEscape, containsQuote, containsRowDelimiter, containsdelimiter, csvrecord, delimiter, err, escape, field, header, i, j, l, len, m, options, quote, quoted, quotedMatch, quotedString, quoted_empty, quoted_match, quoted_string, record, record_delimiter, ref, ref1, regexp, shouldQuote, value; | ||
@@ -359,3 +359,3 @@ if (typeof chunk !== 'object') { | ||
records: this.info.records, | ||
header: header && this.info.records === 0 | ||
header: chunkIsHeader | ||
}); | ||
@@ -377,3 +377,3 @@ if (err) { | ||
records: this.info.records, | ||
header: header && this.info.records === 0 | ||
header: chunkIsHeader | ||
}); | ||
@@ -393,3 +393,3 @@ if (err) { | ||
records: this.info.records, | ||
header: header && this.info.records === 0 | ||
header: chunkIsHeader | ||
}); | ||
@@ -479,3 +479,3 @@ if (err) { | ||
if (this.options.eof) { | ||
headers = this.stringify(headers) + this.options.record_delimiter; | ||
headers = this.stringify(headers, true) + this.options.record_delimiter; | ||
} else { | ||
@@ -482,0 +482,0 @@ headers = this.stringify(headers); |
{ | ||
"version": "5.3.5", | ||
"version": "5.3.6", | ||
"name": "csv-stringify", | ||
@@ -4,0 +4,0 @@ "description": "CSV stringifier implementing the Node.js `stream.Transform` API", |
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
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
68934
1572