DEV Community

Discussion on: Refactoring node.js (Part 1)

Collapse
 
paulasantamaria profile image
Paula Santamaría

Thanks for the suggestion! I was actually aware of that, but I decided to wrap readFilePromise in a function anyway to illustrate how, after using promisify, we can await the "promisified" function within an async function. I couldn't come up with a better example, but I'll try to think of one to avoid any confusion.

Collapse
 
jsardev profile image
Jakub Sarnowski

I was thinking that this might be the case, but I've decided to comment it out, just in case 😄 Great article!