You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of async are you using?
v3.1.0 and also master branch
until
The example source codes are as below:
constresults=[]async.until(functiontest(page,cb){cb(null,page.next==null)},functioniter(next){fetchPage(url,(err,body)=>{if(err)returnnext(err)results=results.concat(body.objects)next(err,body)})},functiondone(err){// all pages have been fetched})
But, test function can have only callback function argument. It cannot receive page argument.
When I print out arguments in the above test function, it has only a function as arguments.
Please check this.
whilst
The example source codes are as below:
varcount=0;async.whilst(functiontest(cb){cb(null,count<5;)},functioniter(callback){count++;setTimeout(function(){callback(null,count);},1000);},function(err,n){// 5 seconds have passed, n = 5});
In test function, semicolon seems to be located at the wrong position.
Maybe, the below code is intended.
functiontest(cb){cb(null,count<5);},
And, in parameter description of test,
asynchronous truth test to perform before each execution of iteratee. Invoked with ().
I think its last sentence seems to be modified as Invoked with (callback) according to the parameter description of until.
The text was updated successfully, but these errors were encountered:
What version of async are you using?
v3.1.0 and also master branch
until
The example source codes are as below:
But,
test
function can have only callback function argument. It cannot receivepage
argument.When I print out
arguments
in the abovetest
function, it has only a function as arguments.Please check this.
whilst
The example source codes are as below:
In
test
function, semicolon seems to be located at the wrong position.Maybe, the below code is intended.
And, in parameter description of
test
,I think its last sentence seems to be modified as
Invoked with (callback)
according to the parameter description ofuntil
.The text was updated successfully, but these errors were encountered: