Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fast-csv

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-csv - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

.idea/libraries/fast_csv_node_modules.xml

2

lib/parser_stream.js

@@ -64,3 +64,3 @@ var extended = require("./extended"),

var ignoreEmpty = this._ignoreEmpty;
if (extended.isBoolean(ignoreEmpty) && ignoreEmpty && EMPTY.test(line.join(""))) {
if (extended.isBoolean(ignoreEmpty) && ignoreEmpty && (!line || EMPTY.test(line.join("")))) {
return null;

@@ -67,0 +67,0 @@ }

@@ -5,4 +5,3 @@ var extended = require("./extended"),

trimLeft = extended.trimLeft,
trimRight = extended.trimRight,
LINE_BREAK = extended.LINE_BREAK;
trimRight = extended.trimRight;

@@ -17,5 +16,6 @@ function createParser(options) {

VALUE_REGEXP = new RegExp("([^" + delimiter + "'\"\\s\\\\]*(?:\\s+[^" + delimiter + "'\"\\s\\\\]+)*)"),
SEARCH_REGEXP = new RegExp("(?:\\n|" + delimiter + ")"),
SEARCH_REGEXP = new RegExp("(?:\\n|\\r|" + delimiter + ")"),
ESCAPE_CHAR = options.escape || '"',
NEXT_TOKEN_REGEXP = new RegExp("([^\\s]|\\\n|" + delimiter + ")");
NEXT_TOKEN_REGEXP = new RegExp("([^\\s]|\\n|\\r|" + delimiter + ")"),
LINE_BREAK = /[\r\n]/;

@@ -72,7 +72,7 @@ function formatItem(item) {

} else {
throw new Error("Parse Error: expected: '" + ESCAPE + "' got: '" + nextToken + "'. at '" + str.substr(cursor).replace(/\n/g, "\\n" + "'"));
throw new Error("Parse Error: expected: '" + ESCAPE + "' got: '" + nextToken + "'. at '" + str.substr(cursor).replace(/[r\n]/g, "\\n" + "'"));
}
} else if ((!depth && nextToken && nextToken.search(SEARCH_REGEXP) === -1)) {
throw new Error("Parse Error: expected: '" + ESCAPE + "' got: '" + nextToken + "'. at '" + str.substr(cursor, 10).replace(/\n/g, "\\n" + "'"));
} else if (hasMoreData && (!nextToken || nextToken.search(LINE_BREAK) === -1)) {
throw new Error("Parse Error: expected: '" + ESCAPE + "' got: '" + nextToken + "'. at '" + str.substr(cursor, 10).replace(/[\r\n]/g, "\\n" + "'"));
} else if (hasMoreData && (!nextToken || !LINE_BREAK.test(nextToken))) {
cursor = null;

@@ -104,3 +104,3 @@ }

}
} else if (nextChar.search(LINE_BREAK) !== -1) {
} else if (LINE_BREAK.test(nextChar)) {
items.push(formatItem(searchStr.substr(0, nextIndex)));

@@ -134,3 +134,3 @@ cursor += nextIndex;

break;
} else if (token === LINE_BREAK) {
} else if (LINE_BREAK.test(token)) {
i = nextToken.cursor + 1;

@@ -137,0 +137,0 @@ if (i < l) {

{
"name": "fast-csv",
"version": "0.2.0",
"version": "0.2.1",
"description": "CSV parser and writer",

@@ -5,0 +5,0 @@ "main": "index.js",

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 not supported yet

Sorry, the diff of this file is not supported yet

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