gdsmith / jquery.easing

jQuery Easing Plugin
http://gsgd.co.uk/sandbox/jquery/easing
Other
922 stars 422 forks source link

Low quality source code #20

Closed AndrewRayCode closed 8 years ago

AndrewRayCode commented 8 years ago

The source code of this library is written as if it were minified code, and it also has lots of redundant logic problems. I'm trying to expand this into non-jQuery functions to use in another library which is why I've discovered these cases.

For example these lines of code:

https://github.com/gdsmith/jquery.easing/blob/master/jquery.easing.js#L104-L111

There's a few things here that are undesirable in source code:

Since these functions have clearly stood the test of time the logic in them is sound and doesn't need to change for the library to work. For a learning opportunity, however, there is much room for improvement.

AndrewRayCode commented 8 years ago

I just opened sourced https://github.com/DelvarWorld/easing-functions to address all of these issues and use the algorithms in an agnostic environment

nonameolsson commented 8 years ago

I'm having a low of warnings when using it JSHint and Gulp. The quality could be improved.

EDIT: Made some changes to the code so now it passes JSHint without errors nor warning https://gist.github.com/nonameolsson/4cefaa34a6dbc7b12e05c4f7cad55fc5

gdsmith commented 8 years ago

Fixed in 1.4