examples/src/demo-app.js
function compare(a, b) {
  var date1 = new Date(a.date);
  var date2 = new Date(b.date);
  if (date1 < date2) {
    return -1;
  }
  if (date1 > date2) {
    return 1;
  }
  return 0;
}
function compare(a, b) {
  var date1 = new Date(a.date);
  var date2 = new Date(b.date);
  if (date1 < date2) {
    return -1;
  }
  if (date1 > date2) {
    return 1;
  }
  return 0;
}
function compare ( a , b ) { var date1 = new Date ( a . date ) ; var date2 = new Date ( b . date ) ; if ( date1 < date2 ) { return - 1 ; } if ( date1 > date2 ) { return 1 ; } return 0 ; }
Sorts by date.
Sorts by date .