Closed fisker closed 2 years ago
Not a big fan, to be honest. I find the code less readable after this change, and the existing duplication is not that bad. This also introduces a dependency, and a risk, as gensync
is a big hack. All this to save 13 lines of code. Do you think it's worth it?
Okay.
I found
gensync
is a very handy module, it allows you to write the async and sync logic in one function.How do you think?