Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Zepto.qsa & some other ternary operator changes #626
I mentioned in #623 that I would submit a pull request that reduced the number of ternary operators that we use inside Zepto.
Here are two of these changes.
Uglify.js seems to be smart enough to inline if statements into ternary operators when they are used to build return statements, but it isn't smart enough to inline variables into ternary operators.
The code/style guide reflects these changes.
Wow that's a lot of changes.
I'll take a look more closely when I have time. For now, I see a lot of
I'll cherry-pick your changes that I want, and leave the ones that replace
Abuse is what we did in
That doesn't mean it won't be for the next release. We just didn't have time while baking the 1.0 to do so many code style & quality changes. For the same reason we also left speed optimizations for the future v1.1.
To save us some time, you chould rebase your changes to the latest master, and cleanup the history in this PR by squashing the "oops" commits into the previous commit they are fixing. Each commit should only describe 1 change to a particular piece of code.