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.
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.I was thinking that this might be the case, but I've decided to comment it out, just in case 😄 Great article!