nodeSteam
nodeSteam copied to clipboard
General Cleanup
The switch statement in the validate function is getting a little bit ugly.
Renamed to "General Cleanup" as there are a lot of issues that could be addressed.
Because this project hasn't had any real organizational fixes or changes in 5 years, it might be time to reshuffle things around. A lot of methods have been added and the tests have degraded to barely-useful status. I'm thinking about the following:
One file for each API method that contains both the url construction and validation rules. Also a corresponding .spec file for each.
~Also adding a .jshint (to make sure all the missing curly braces and semi-colons get fixed)~ (done in v0.5.0)
I'd also like to switch everything to strict comparison operators (=== and !==) but I'm not totally sure that won't introduce regression issues.
Also worth considering is supporting a callback-as-second-argument in addition to the callback property so it plays nicer with promisify (I have no desire to switch the library to promises, but making it easy to wrap if someone desires would be a good convenience). It wasn't really a standard convention when the library was created, but it definitely is now.
I'm not interested in switching to es6 (const/let) or adding additional build process/compilation.
~Also would like better documentation, possibly using github wiki or a github-page example for browsing through the api methods. This could be generated from jsdoc comments.~ (done in v0.5.0)