loading...

re: Adapting Rusty Old Callbacks to Shiny Async Functions VIEW POST

FULL DISCUSSION
 

Or you could use util.promisify without having to install a single library.

 

Definitely one way you could go!

asyncAdapter can work in Node.js or browser js files, whereas util.promisify is a node-only option.

 

True, I always forget the browser. At that point I would probably use Bluebird's promisify, but only because I love Bluebird. This option is a nice save for the browser.

Code of Conduct Report abuse