Permalink
Browse files

shaved more characters, minified is now smaller than before

  • Loading branch information...
mrDarcyMurphy committed Jun 9, 2013
1 parent c829ac2 commit b3090bb4479b37673b373bed28b109e9ded7c7f0
Showing with 8 additions and 7 deletions.
  1. +1 −1 is.min.js
  2. +7 −6 lib/is.js
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -381,12 +381,13 @@
*/
function sortDates(x, y) {
y = !is.date(y) ? new Date() : y
- return x.getFullYear() < y.getFullYear() ? -1
- : x.getFullYear() > y.getFullYear() ? 1
- : x.getMonth() < y.getMonth() ? -1
- : x.getMonth() > y.getMonth() ? 1
- : x.getDate() < y.getDate() ? -1
- : x.getDate() > y.getDate() ? 1
+ var a = 'getFullYear', b = 'getMonth', c = 'getDate'
+ return x[a]() < y[a]() ? -1
+ : x[a]() > y[a]() ? 1
+ : x[b]() < y[b]() ? -1
+ : x[b]() > y[b]() ? 1
+ : x[c]() < y[c]() ? -1
+ : x[c]() > y[c]() ? 1
: 0
}

0 comments on commit b3090bb

Please sign in to comment.