improve even odd checking and avoid substr call where unnecessary#13952
improve even odd checking and avoid substr call where unnecessary#13952marijaselakovic wants to merge 2 commits intoangular:masterfrom
Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
1 similar comment
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
|
I signed it! |
|
CLAs look good, thanks! |
1 similar comment
|
CLAs look good, thanks! |
|
There is a jsHint check failure (see https://travis-ci.org/angular/angular.js/jobs/107253414). |
disabled jsHint's bitwise check
I would propose two slight optimizations:
You should avoid call to substr if not necessary, so instead vendorPrefix.substr(0, 1), use vendorPrefix[0] which is cheaper and semantically equivalent.
As explained in https://github.com/angular/angular.js/pull/4359, adapt even odd checking in ngClass