csv-builder
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -145,3 +145,3 @@ const { Readable, Transform } = require('stream') | ||
return arr.map(col => { | ||
col = col.toString() | ||
col = this._stringifyCol(col) | ||
if (this.format.quoted && hasQuotes(col)) { | ||
@@ -156,4 +156,14 @@ col = col.replace(QUOTE_RE, '""') | ||
} | ||
_stringifyCol (col) { | ||
if (col === void 0 || col === null) { | ||
return '' | ||
} | ||
if (col.toString) { | ||
return col.toString() | ||
} | ||
return '' | ||
} | ||
} | ||
module.exports = CsvBuilder |
{ | ||
"name": "csv-builder", | ||
"author": "Nick Pisacane <pisacanen@gmail.com>", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Easily encode complex JSON objects to CSV with CsvBuilder's schema-like API", | ||
@@ -30,4 +30,4 @@ "license": "MIT", | ||
"chai": "^3.5.0", | ||
"mocha": "^3.3.0", | ||
"standard": "^10.0.2", | ||
"mocha": "^3.5.3", | ||
"standard": "^10.0.3", | ||
"watch-run": "^1.2.5" | ||
@@ -34,0 +34,0 @@ }, |
@@ -7,7 +7,7 @@ # Csvbuilder | ||
# Table Of Contents | ||
* [Usage](#Usage) | ||
* [New Features](#New-Features) | ||
* [Installation](#Installation) | ||
* [API](#API) | ||
* [Migration To 1.0.0](#Migration-to-1.0.0) | ||
* [Usage](#usage) | ||
* [New Features](#new-features) | ||
* [Installation](#installation) | ||
* [API](#api) | ||
* [Migration To 1.0.0](#migration-to-100) | ||
@@ -14,0 +14,0 @@ # Usage |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
59756
8
352
0