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.0.4 to 1.0.5

21

lib/index.js

@@ -79,3 +79,3 @@ // Generated by CoffeeScript 1.10.0

Parser = function(options) {
var base, base1, base10, base11, base12, base2, base3, base4, base5, base6, base7, base8, base9, k, v;
var base, base1, base10, base11, base12, base13, base2, base3, base4, base5, base6, base7, base8, base9, k, v;
if (options == null) {

@@ -130,2 +130,5 @@ options = {};

}
if ((base13 = this.options).max_limit_on_data_read == null) {
base13.max_limit_on_data_read = 128000;
}
this.lines = 0;

@@ -187,2 +190,12 @@ this.count = 0;

var field, i, j, len, lineAsColumns;
if (!this.line_length && line.length > 0) {
this.line_length = line.length;
}
if (line.length !== this.line_length) {
if (this.options.columns != null) {
this.emit('error', new Error("Number of columns on line " + (this.lines + 1) + " does not match header"));
} else {
this.emit('error', new Error("Number of columns is inconsistent on line " + (this.lines + 1)));
}
}
if (this.options.columns === true) {

@@ -388,2 +401,8 @@ this.options.columns = line;

}
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)));
}
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)));
}
}

@@ -390,0 +409,0 @@ this.buf = '';

2

package.json
{
"version": "1.0.4",
"version": "1.0.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