Comparing version 0.5.3 to 0.5.4
@@ -8,24 +8,23 @@ var is = require("is-extended"); | ||
.register("asyncEach", function (arr, iter, cb) { | ||
(function asyncIterator(i, l, rows, cb) { | ||
try { | ||
if (++i < l) { | ||
iter(rows[i], function (err) { | ||
if (err) { | ||
cb(err); | ||
if (++i < l) { | ||
iter(rows[i], function (err) { | ||
if (err) { | ||
cb(err); | ||
} else { | ||
if ((i % 100) === 0) { | ||
//dont overflow the stack | ||
setImmediate(function () { | ||
asyncIterator(i, l, rows, cb); | ||
}); | ||
} else { | ||
if ((i % 100) === 0) { | ||
//dont overflow the stack | ||
setImmediate(function () { | ||
asyncIterator(i, l, rows, cb); | ||
}); | ||
} else { | ||
asyncIterator(i, l, rows, cb); | ||
} | ||
asyncIterator(i, l, rows, cb); | ||
} | ||
}); | ||
} else { | ||
cb(null, arr); | ||
} | ||
} catch (e) { | ||
cb(e); | ||
} | ||
}); | ||
} else { | ||
//get out of stack | ||
cb(null, arr); | ||
} | ||
@@ -32,0 +31,0 @@ }(-1, arr.length, arr, cb)); |
@@ -172,3 +172,3 @@ var extended = require("../extended"), | ||
} catch (e) { | ||
this.emit("error", e); | ||
cb(e); | ||
} | ||
@@ -175,0 +175,0 @@ }, |
@@ -14,3 +14,3 @@ var extended = require("./../extended"), | ||
doTrim = options.trim || false, | ||
ESCAPE = options.quote || '"', | ||
ESCAPE = has(options, "quote") ? options.quote : '"', | ||
VALUE_REGEXP = new RegExp("([^" + delimiter + "'\"\\s\\\\]*(?:\\s+[^" + delimiter + "'\"\\s\\\\]+)*)"), | ||
@@ -17,0 +17,0 @@ SEARCH_REGEXP = new RegExp("(?:\\n|\\r|" + delimiter + ")"), |
{ | ||
"name": "fast-csv", | ||
"version": "0.5.3", | ||
"version": "0.5.4", | ||
"description": "CSV parser and writer", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -24,3 +24,3 @@ [![build status](https://secure.travis-ci.org/C2FO/fast-csv.png)](http://travis-ci.org/C2FO/fast-csv) | ||
* **NOTE** When specifying an alternate `delimiter` you may only pass in a single character delimiter | ||
* `quote='"'`: The character to use to escape values that contain a delimiter. | ||
* `quote='"'`: The character to use to escape values that contain a delimiter. If you set to `null` then all quoting will be ignored | ||
* `escape='"'`: The character to use when escaping a value that is `quoted` and contains a `quote` character. | ||
@@ -27,0 +27,0 @@ * `i.e`: 'First,"Name"' => '"First,""name"""' |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
130887
911