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 2.1.0 to 3.0.0

4

CHANGELOG.md
# Changelog
## Version 3.0.0
* Switch linebreak check for rowDelimiter check
## Version 2.1.0

@@ -5,0 +9,0 @@

6

lib/es5/index.js

@@ -290,3 +290,3 @@ 'use strict';

Stringifier.prototype.stringify = function (line) {
var _line, column, columns, containsEscape, containsLinebreak, containsQuote, containsdelimiter, delimiter, escape, field, i, j, l, newLine, quote, ref, ref1, regexp, shouldQuote, value;
var _line, column, columns, containsEscape, containsQuote, containsRowDelimiter, containsdelimiter, delimiter, escape, field, i, j, l, newLine, quote, ref, ref1, regexp, shouldQuote, value;
if ((typeof line === 'undefined' ? 'undefined' : _typeof(line)) !== 'object') {

@@ -347,4 +347,4 @@ return line;

containsEscape = field.indexOf(escape) >= 0 && escape !== quote;
containsLinebreak = field.indexOf('\r') >= 0 || field.indexOf('\n') >= 0;
shouldQuote = containsQuote || containsdelimiter || containsLinebreak || this.options.quoted || this.options.quotedString && typeof line[i] === 'string';
containsRowDelimiter = field.indexOf(this.options.rowDelimiter) >= 0;
shouldQuote = containsQuote || containsdelimiter || containsRowDelimiter || this.options.quoted || this.options.quotedString && typeof line[i] === 'string';
if (shouldQuote && containsEscape) {

@@ -351,0 +351,0 @@ regexp = escape === '\\' ? new RegExp(escape + escape, 'g') : new RegExp(escape, 'g');

@@ -284,3 +284,3 @@ // Generated by CoffeeScript 2.0.3

Stringifier.prototype.stringify = function(line) {
var _line, column, columns, containsEscape, containsLinebreak, containsQuote, containsdelimiter, delimiter, escape, field, i, j, l, newLine, quote, ref, ref1, regexp, shouldQuote, value;
var _line, column, columns, containsEscape, containsQuote, containsRowDelimiter, containsdelimiter, delimiter, escape, field, i, j, l, newLine, quote, ref, ref1, regexp, shouldQuote, value;
if (typeof line !== 'object') {

@@ -340,4 +340,4 @@ return line;

containsEscape = field.indexOf(escape) >= 0 && (escape !== quote);
containsLinebreak = field.indexOf('\r') >= 0 || field.indexOf('\n') >= 0;
shouldQuote = containsQuote || containsdelimiter || containsLinebreak || this.options.quoted || (this.options.quotedString && typeof line[i] === 'string');
containsRowDelimiter = field.indexOf(this.options.rowDelimiter) >= 0;
shouldQuote = containsQuote || containsdelimiter || containsRowDelimiter || this.options.quoted || (this.options.quotedString && typeof line[i] === 'string');
if (shouldQuote && containsEscape) {

@@ -344,0 +344,0 @@ regexp = escape === '\\' ? new RegExp(escape + escape, 'g') : new RegExp(escape, 'g');

{
"version": "2.1.0",
"version": "3.0.0",
"name": "csv-stringify",

@@ -4,0 +4,0 @@ "description": "CSV stringifier implementing the Node.js `stream.Transform` API",

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