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
{{ message }}
This repository was archived by the owner on Jul 3, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 3, 2021. It is now read-only.
if people want to use Promise, node v8's promisfy or bluebird's promisfy function is a viable option. 90% of the callbacks plugAPI provides is in the correct form of callback(err, data) => {}; (There are a few that only callback(data) )
I see no benefit of having to rewrite the entire lib to use promises and making people change their existing code to have to use promises.
Activity
thedark1337 commentedon Oct 16, 2017
if people want to use Promise, node v8's promisfy or bluebird's promisfy function is a viable option. 90% of the callbacks plugAPI provides is in the correct form of callback(err, data) => {}; (There are a few that only callback(data) )
I see no benefit of having to rewrite the entire lib to use promises and making people change their existing code to have to use promises.
Dazzuh commentedon Oct 16, 2017
mortenn commentedon Oct 16, 2017
In my opinion, using a standard feature of the platform is a benefit in and of itself.
mortenn commentedon Oct 16, 2017
As a kind of compromise, maybe methods that take a callback could return a promise if called without a callback argument?
mortenn commentedon Oct 17, 2017
As an interim solution, I wrote this function:
Or, if you want to be slightly more evil:
;)