Socket
Socket
Sign inDemoInstall

csv-stringify

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csv-stringify - npm Package Compare versions

Comparing version 0.0.8 to 1.0.1

17

lib/index.js

@@ -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",

}
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc