simpleasync
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -120,2 +120,8 @@ | ||
if (!dl) { | ||
data = []; | ||
setImmediate(doStep); | ||
return; | ||
} | ||
for (var n in data) | ||
@@ -122,0 +128,0 @@ fn.map(data[n], makecbmap(n)); |
{ "name": "simpleasync" | ||
, "description": "Simple flow library to chain and run functions with asynchronous calls" | ||
, "keywords": [ "node", "asynchronous", "library" ] | ||
, "version": "0.0.4" | ||
, "version": "0.0.5" | ||
, "author": "Angel 'Java' Lopez <webmaster@ajlopez.com> (http://www.ajlopez.com)" | ||
@@ -6,0 +6,0 @@ , "repository": { "type": "git", "url": "git://github.com/ajlopez/SimpleAsync.git" } |
@@ -191,2 +191,3 @@ # SimpleAsync | ||
- 0.0.4: Published, fail function | ||
- 0.0.5: Published, fix async map with empty array | ||
@@ -193,0 +194,0 @@ ## License |
@@ -51,1 +51,22 @@ | ||
} | ||
exports['map empty array with async fn and then'] = function (test) { | ||
test.async(); | ||
var total = 0; | ||
var seq = async() | ||
.map(function (item, next) { | ||
next(null, item * item); | ||
}) | ||
.then(function (data) { | ||
test.ok(data); | ||
test.ok(Array.isArray(data)); | ||
test.equal(data.length, 0); | ||
test.done(); | ||
}); | ||
test.ok(seq); | ||
test.strictEqual(seq.run([]), seq); | ||
} |
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
19792
450
207