New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

json-csv

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-csv - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

8

exporter.js

@@ -7,2 +7,3 @@ var es = require('event-stream');

this.options = options || {}
this.fieldSeparator = this.options.fieldSeparator || ',';
}

@@ -28,2 +29,3 @@

this.options = options || {}
this.fieldSeparator = this.options.fieldSeparator || ',';
var self = this;

@@ -42,3 +44,3 @@

exporter.prototype.prepValue = function(arg, forceQuoted) {
var quoted = forceQuoted || arg.indexOf('"') >= 0 || arg.indexOf(',') >= 0 || arg.indexOf('\n') >= 0
var quoted = forceQuoted || arg.indexOf('"') >= 0 || arg.indexOf(this.fieldSeparator) >= 0 || arg.indexOf('\n') >= 0
var result = arg.replace(/\"/g,'""')

@@ -55,3 +57,3 @@ if (quoted)

if (line)
line += ','
line += this.fieldSeparator
line += self.prepValue(label)

@@ -69,3 +71,3 @@ return line

if (line)
line += ','
line += this.fieldSeparator

@@ -72,0 +74,0 @@ var val = self.getValue(data, field.name)

{
"name": "json-csv",
"version": "1.0.2",
"version": "1.0.3",
"description": "Export a richly structured, JSON array to CSV",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/IWSLLC/json-csv",

@@ -54,3 +54,5 @@ json-csv

}
]
],
// use a different field separator char
fieldSeparator : ';'
}

@@ -57,0 +59,0 @@ ```

Sorry, the diff of this file is not supported yet

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