javascript - how does the callback in fs.readfile get called when using fs.readfile.bind(context,pathArgument) -


how callback in fs.readfile called when using fs.readfile.bind(context,pathargument) so. //understandable because task function knows name of callback parameter

async.series([function(callback){ //operation done callback()},...],finalcallback(err,result)); 

but //not understandable

async.series([fs.someoperation.bind(null,firstargument),...],finalcallback(err,esult))  

i believe understand partial application;however, this. function(callback){ fs.someoperation(firstargument, ????)}(asynccallbackfunc) , have no idea how second argument called... thx, in advance helping me clear up.

all bind set context of callback. still regular callback other. except, explicitly told this be. looks in case, set null.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -