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
Post a Comment