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:
src/bot.js
require (unused in this module anyway)
src/network.js
require
networkRequest()
refreshToken()
package.json
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)
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:src/bot.js
src/network.js
networkRequest()
refreshToken()
package.json
Note: changes will also need to be made to functions that make use of
networkRequest()
andrefreshToken()
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