csv-stringify
Advanced tools
Comparing version 0.0.8 to 1.0.1
@@ -1,3 +0,3 @@ | ||
// Generated by CoffeeScript 1.9.2 | ||
var Stringifier, stream, util; | ||
// Generated by CoffeeScript 1.10.0 | ||
var Stringifier, get, stream, util; | ||
@@ -8,2 +8,4 @@ stream = require('stream'); | ||
get = require('lodash.get'); | ||
module.exports = function() { | ||
@@ -165,3 +167,3 @@ var callback, chunks, data, options, stringifier; | ||
Stringifier.prototype.write = function(chunk, encoding, callback) { | ||
var base, e, preserve; | ||
var base, e, error, preserve; | ||
if (chunk == null) { | ||
@@ -179,4 +181,4 @@ return; | ||
this.emit('record', chunk, this.countWriten); | ||
} catch (_error) { | ||
e = _error; | ||
} catch (error) { | ||
e = error; | ||
return this.emit('error', e); | ||
@@ -211,3 +213,3 @@ } | ||
Stringifier.prototype.stringify = function(line) { | ||
var _line, column, columns, containsLinebreak, containsQuote, containsdelimiter, delimiter, escape, field, i, j, l, newLine, quote, ref, ref1, regexp; | ||
var _line, column, columns, containsLinebreak, containsQuote, containsdelimiter, delimiter, escape, field, i, j, l, newLine, quote, ref, ref1, regexp, value; | ||
if (typeof line !== 'object') { | ||
@@ -228,3 +230,4 @@ return line; | ||
column = columns[i]; | ||
_line[i] = typeof line[column] === 'undefined' || line[column] === null ? '' : line[column]; | ||
value = get(line, column); | ||
_line[i] = typeof value === 'undefined' || value === null ? '' : value; | ||
} | ||
@@ -231,0 +234,0 @@ } else { |
{ | ||
"version": "0.0.8", | ||
"version": "1.0.1", | ||
"name": "csv-stringify", | ||
@@ -12,3 +12,5 @@ "description": "CSV stringifier implementing the Node.js `stream.Transform` API", | ||
"homepage": "http://csv.adaltas.com/stringify/", | ||
"dependencies": {}, | ||
"dependencies": { | ||
"lodash.get": "^4.0.0" | ||
}, | ||
"devDependencies": { | ||
@@ -27,2 +29,2 @@ "coffee-script": "latest", | ||
} | ||
} | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
13669
306
1
1
+ Addedlodash.get@^4.0.0
+ Addedlodash.get@4.4.2(transitive)