DEV Community

Discussion on: Adapting Rusty Old Callbacks to Shiny Async Functions

Collapse
 
geoff profile image
Geoff Davis

Definitely one way you could go!

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

Collapse
 
danielescoz profile image
Daniel Escoz

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.