Socket
Socket
Sign inDemoInstall

csv-parse

Package Overview
Dependencies
Maintainers
1
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csv-parse - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

21

lib/index.js

@@ -140,2 +140,4 @@ // Generated by CoffeeScript 1.10.0

this.count = 0;
this.skipped_line_count = 0;
this.empty_line_count = 0;
this.is_int = /^(\-|\+)?([1-9]+[0-9]*)$/;

@@ -205,4 +207,8 @@ this.is_float = function(value) {

}
if (line.length !== this.line_length && !this.options.relax_column_count && !(line.length === 1 && line[0] === '')) {
if (this.options.columns != null) {
if (line.length === 1 && line[0] === '') {
this.empty_line_count++;
} else if (line.length !== this.line_length) {
if (this.options.relax_column_count) {
this.skipped_line_count++;
} else if (this.options.columns != null) {
throw Error("Number of columns on line " + this.lines + " does not match header");

@@ -212,4 +218,5 @@ } else {

}
} else {
this.count++;
}
this.count++;
if (this.options.columns != null) {

@@ -419,6 +426,6 @@ lineAsColumns = {};

if (!this.commenting && this.field.length > this.options.max_limit_on_data_read) {
throw Error("Delimter not found in the file " + (JSON.stringify(this.options.delimiter)));
throw Error("Delimiter not found in the file " + (JSON.stringify(this.options.delimiter)));
}
if (!this.commenting && this.line.length > this.options.max_limit_on_data_read) {
throw Error("Row delimter not found in the file " + (JSON.stringify(this.options.rowDelimiter)));
throw Error("Row delimiter not found in the file " + (JSON.stringify(this.options.rowDelimiter)));
}

@@ -437,3 +444,3 @@ }

if (this.field.length > this.options.max_limit_on_data_read) {
throw Error("Delimter not found in the file " + (JSON.stringify(this.options.delimiter)));
throw Error("Delimiter not found in the file " + (JSON.stringify(this.options.delimiter)));
}

@@ -444,3 +451,3 @@ if (l === 0) {

if (this.line.length > this.options.max_limit_on_data_read) {
throw Error("Row delimter not found in the file " + (JSON.stringify(this.options.rowDelimiter)));
throw Error("Row delimiter not found in the file " + (JSON.stringify(this.options.rowDelimiter)));
}

@@ -447,0 +454,0 @@ }

{
"version": "1.1.4",
"version": "1.1.5",
"name": "csv-parse",

@@ -4,0 +4,0 @@ "description": "CSV parsing 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