Closed fvictorio closed 6 years ago
@fvictorio why not async/await tho?
It's another alternative, but it's only supported in recent node versions, so you need to transpile the code (with babel for example) or disallow using older versions of node.
Besides that, and this is just a personal opinion, async/await is pretty new and I'm not sure if best practices around it are already settled, so it might be a little riskier.
Anyway, I'm ok with using it if you prefer it.
I'm fine with promises. @vbaranov what do you think?
Totally agree with promises
This will probably be a big refactor, but I think the impact in maintainability is huge.
Code like this:
would be replaced by: