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
to be even able to pass callback to the returned promise's .then method.
constfs=require('fs')consthybridify=require('hybridify')constreaddir=hybridify.hybridify(fs.readdir)// called two timesfunctioncallback(err,files){if(err)returnconsole.error('callback err:',err)console.log('callback res:',files)// => array with directory files}constpromise=readdir('./',callback)promise.then(callback)
The text was updated successfully, but these errors were encountered:
Like that on
L48-49-50
to be even able to pass callback to the returned promise's
.then
method.The text was updated successfully, but these errors were encountered: