Comparing version 0.0.1 to 0.0.2
@@ -8,5 +8,6 @@ module.exports = function(afterAllCb) { | ||
return function thecallback(err) { | ||
return function thecallback() { | ||
var args = arguments; | ||
process.nextTick(function() { | ||
cb.apply(null, arguments); | ||
cb.apply(null, args); | ||
if (--calls === 0) afterAllCb(); | ||
@@ -13,0 +14,0 @@ }); |
{ | ||
"name": "after-all", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Execute several async functions and get a callback when they are all done", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -56,2 +56,11 @@ var afterAll = require('../index'); | ||
}); | ||
it('should pass the arguments to the original callbacks', function(done) { | ||
var next = afterAll(function() { | ||
done(); | ||
}); | ||
(next(function(a) { a.should.eql(2)}))(2); | ||
(next(function(b) { b.should.eql('hi')}))('hi'); | ||
}); | ||
}); |
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
3483
66