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
pify has a nice feature where you can promisify an obj's methods
example from readme:
// Promisify all methods in a modulepify(fs).readFile('package.json','utf8').then(data=>{console.log(JSON.parse(data).name);//=> 'pify'});
however this doesnt work when the child methods expect a reference to the owning object
example from my experience:
constClient=require('coinbase').Clientconstpify=require('pify')constclient=pify(newClient({}))constaccounts=awaitclient.getAccounts(null)// fails due to unset `this` reference
pify has a nice feature where you can promisify an obj's methods
example from readme:
however this doesnt work when the child methods expect a reference to the owning object
example from my experience:
work around - use
bind-all
:The text was updated successfully, but these errors were encountered: