Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

json2csvexporter

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json2csvexporter - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

.idea/markdown-navigator.xml

56

lib/WriterService.js

@@ -40,9 +40,36 @@ 'use strict';

_createClass(WriterService, [{
key: 'writeValue',
key: 'wrapWithQuotes',
/**
* Returns the input string
* @param {string} string - The input string.
* @return {string} - A safe strings wrapped in quotes.
*/
value: function wrapWithQuotes(string) {
var safeString = string.replace(/"/g, '""');
return '"' + safeString + '"';
}
/**
* @param {*} value
* @return {string}
*/
}, {
key: 'sanitizeValue',
value: function sanitizeValue(value) {
if (value === undefined || value === null || typeof value === 'function') {
return '';
}
return String(value);
}
/**
* Pushes a new value into the current row.
* @param {*} value - The value to push.
*/
}, {
key: 'writeValue',
value: function writeValue(value) {

@@ -97,29 +124,2 @@ var stringValue = this.sanitizeValue(value);

}
/**
* Returns the input string
* @param {string} string - The input string.
* @return {string} - A safe strings wrapped in quotes.
*/
}], [{
key: 'wrapWithQuotes',
value: function wrapWithQuotes(string) {
var safeString = string.replace(/"/g, '""');
return '"' + safeString + '"';
}
/**
* @param {*} value
* @return {string}
*/
}, {
key: 'sanitizeValue',
value: function sanitizeValue(value) {
if (value === undefined || value === null || typeof value === 'function') {
return '';
}
return String(value);
}
}]);

@@ -126,0 +126,0 @@

{
"name": "json2csvexporter",
"version": "0.3.0",
"version": "0.4.0",
"author": "Filip Danic <filip@spicefactory.com> (danicfilip.com)",

@@ -5,0 +5,0 @@ "main": "lib/CSVExportService.js",

Sorry, the diff of this file is not supported yet

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