New Promise Syntax Proposal
T.J. Crowder
tj.crowder at farsightsoftware.com
Mon Nov 6 15:43:26 UTC 2017
On Mon, Nov 6, 2017 at 3:39 PM, Jorge Téllez
<novohispano at gmail.com> wrote:
> Yes, I’ll be happy to provide a concrete example.
Very useful example!
In that scenario I'd convert to promises *early*, by promisifying the
`interface.question` function once (using [`util.promisify`][1] or
roll-your-own if needed), and then using the promisified version throughout
(which lets you use `async` functions).
-- T.J. Crowder
[1]: https://nodejs.org/api/util.html#util_util_promisify_original
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20171106/22b8a9b1/attachment.html>
More information about the es-discuss
mailing list