cannawen / metric_units_reddit_bot

Reddit bot converting imperial units to metric units
https://www.reddit.com/user/metric_units
GNU General Public License v3.0
78 stars 34 forks source link

Refactor network module to avoid use of deasync #63

Closed rafd closed 6 years ago

rafd commented 6 years ago

metric_units is a sassy reddit bot that finds imperial units, and replies with a metric conversion.

Enhancement request: deasync is used to create functions that act like they are synchronous, but, this is very non-idiomatic (i.e. "things aren't typically done this way in javascript-land"), unnecessary (i.e. it is possible to implement in other ways), and affects performance.

Potential patterns to refactor with: callbacks, promises or await.

deasync should be removed from:

Note: changes will also need to be made to functions that make use of networkRequest() and refreshToken() and so on...

Recommended reading: CONTRIBUTING.md (sections "Etiquette", "Work on an issue" and "Make a PR" are most important)

Recommended skills: Javascript

Estimated effort: 1-2 hours

aterranova-bv commented 6 years ago

This project is awesome!

I can tackle this issue, Happy Hacktoberfest! 🎃 👻 🎃 👻 🎃 👻

cannawen commented 6 years ago

Sounds good, thank you! Assigned to @aterranova-bv