Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General Cleanup #15

Open
Xenira opened this issue Oct 9, 2016 · 1 comment
Open

General Cleanup #15

Xenira opened this issue Oct 9, 2016 · 1 comment

Comments

@Xenira
Copy link
Contributor

Xenira commented Oct 9, 2016

The switch statement in the validate function is getting a little bit ugly.

@Tidwell
Copy link
Owner

Tidwell commented Oct 10, 2016

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)

@Tidwell Tidwell changed the title Cleanup Validate Function General Cleanup Oct 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants