lib/poet/utils.js
function sortPosts (posts) {
  return Object.keys(posts).map(function (post) { return posts[post]; })
    .sort(function (a,b) {
      if ( a.date < b.date ) return 1;
      if ( a.date > b.date ) return -1;
      return 0;
    });
}
function sortPosts (posts) {
  return Object.keys(posts).map(function (post) { return posts[post]; })
    .sort(function (a,b) {
      if ( a.date < b.date ) return 1;
      if ( a.date > b.date ) return -1;
      return 0;
    });
}
function sortPosts ( posts ) { return Object . keys ( posts ) . map ( function ( post ) { return posts [ post ] ; } ) . sort ( function ( a , b ) { if ( a . date < b . date ) return 1 ; if ( a . date > b . date ) return - 1 ; return 0 ; } ) ; }
Takes an array `posts` of post objects and returns a
new, sorted version based off of date

@params {Array} posts
@returns {Array}
Takes an array posts of post objects and returns a new sorted version based off of date