csv-parse
Advanced tools
Comparing version
@@ -118,6 +118,10 @@ import { normalize_columns_array } from "./normalize_columns_array.js"; | ||
// Renormalize original options with the new encoding | ||
this.options = normalize_options({ | ||
const options = normalize_options({ | ||
...this.original_options, | ||
encoding: encoding, | ||
}); | ||
// Properties are merged with the existing options instance | ||
for (const key in options) { | ||
this.options[key] = options[key]; | ||
} | ||
// Options will re-evaluate the Buffer with the new encoding | ||
@@ -124,0 +128,0 @@ ({ comment, escape, quote } = this.options); |
@@ -653,3 +653,3 @@ import { normalize_columns_array } from "./normalize_columns_array.js"; | ||
options.to = -1; | ||
} else { | ||
} else if (options.to !== -1) { | ||
if (typeof options.to === "string" && /\d+/.test(options.to)) { | ||
@@ -673,3 +673,3 @@ options.to = parseInt(options.to); | ||
options.to_line = -1; | ||
} else { | ||
} else if (options.to_line !== -1) { | ||
if (typeof options.to_line === "string" && /\d+/.test(options.to_line)) { | ||
@@ -676,0 +676,0 @@ options.to_line = parseInt(options.to_line); |
{ | ||
"version": "6.0.0", | ||
"version": "6.1.0", | ||
"name": "csv-parse", | ||
@@ -142,3 +142,4 @@ "description": "CSV parsing implementing the Node.js `stream.Transform` API", | ||
} | ||
} | ||
}, | ||
"gitHead": "c0e42c9cf0ec6b9e1f453279e36f621ce782d2eb" | ||
} |
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
1438059
0.24%30
3.45%35590
0.1%