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 5.3.2 to 5.3.3

2

lib/api/CsvError.js
class CsvError extends Error {
constructor(code, message, options, ...contexts) {
if(Array.isArray(message)) message = message.join(' ');
if(Array.isArray(message)) message = message.join(' ').trim();
super(message);

@@ -6,0 +6,0 @@ if(Error.captureStackTrace !== undefined){

@@ -64,3 +64,3 @@

parse: function(nextBuf, end, push, close){
const {bom, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options;
const {bom, encoding, from_line, ltrim, max_record_size,raw, relax_quotes, rtrim, skip_empty_lines, to, to_line} = this.options;
let {comment, escape, quote, record_delimiter} = this.options;

@@ -201,7 +201,10 @@ const {bomSkipped, previousBuf, rawBuffer, escapeIsQuote} = this.state;

if(relax_quotes === false){
const info = this.__infoField();
const bom = Object.keys(boms).map(b => boms[b].equals(this.state.field.toString()) ? b : false).filter(Boolean)[0];
const err = this.__error(
new CsvError('INVALID_OPENING_QUOTE', [
'Invalid Opening Quote:',
`a quote is found inside a field at line ${this.info.lines}`,
], this.options, this.__infoField(), {
`a quote is found on field ${JSON.stringify(info.column)} at line ${info.lines}, value is ${JSON.stringify(this.state.field.toString(encoding))}`,
bom ? `(${bom} bom)` : undefined
], this.options, info, {
field: this.state.field,

@@ -208,0 +211,0 @@ })

{
"version": "5.3.2",
"version": "5.3.3",
"name": "csv-parse",

@@ -127,3 +127,3 @@ "description": "CSV parsing implementing the Node.js `stream.Transform` API",

},
"gitHead": "f5b1946347e762a84187c685a17773c06bf37565"
"gitHead": "64895113de5e884a05f5d860ab63ed6b83fb240d"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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