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 -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -