async-each-series
Advanced tools
Comparing version 0.0.1 to 0.1.0
@@ -1,5 +0,4 @@ | ||
module.exports = function (arr, iterator, callback) { | ||
callback = callback || function () {}; | ||
if (!arr.length) { | ||
if (!Array.isArray(arr) || !arr.length) { | ||
return callback(); | ||
@@ -15,4 +14,4 @@ } | ||
else { | ||
completed += 1; | ||
if (completed >= arr.length) { callback(null); } | ||
++completed; | ||
if (completed >= arr.length) { callback(); } | ||
else { iterate(); } | ||
@@ -19,0 +18,0 @@ } |
{ | ||
"name": "async-each-series", | ||
"version": "0.0.1", | ||
"version": "0.1.0", | ||
"description": "Apply an async function to each Array element in series.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
3349