Closed
Description
Here is a proposal for gradually moving node.js toward the ES6 future: all async methods in the node standard library which currently take a callback and return no value would instead be extended to return a Promise
which can be used instead of the callback. (The callback would become optional, if it is not already. If you are really worried about performance for legacy code, you can return the Promise
only if no callback is supplied by the caller.)
This would eliminate the need for extensive promisify
calls in code using ES6 Promise
s (or ES7 async functions), and provide an API like that enabled by the nodify
functions in bluebird
and prfun
.
Metadata
Metadata
Assignees
Labels
No labels