lib/poet/helpers.js
function getPosts (poet) {
  if (poet.cache.posts)
    return poet.cache.posts;

  var posts = utils.sortPosts(poet.posts).filter(function (post) {
    // Filter out draft posts if showDrafts is false
    return (poet.options.showDrafts || !post.draft) &&
    // Filter out posts in the future if showFuture is false
      (poet.options.showFuture || post.date < Date.now());
  });

  return poet.cache.posts = posts;
}
function getPosts (poet) {
  if (poet.cache.posts)
    return poet.cache.posts;

  var posts = utils.sortPosts(poet.posts).filter(function (post) {
    // Filter out draft posts if showDrafts is false
    return (poet.options.showDrafts || !post.draft) &&
    // Filter out posts in the future if showFuture is false
      (poet.options.showFuture || post.date < Date.now());
  });

  return poet.cache.posts = posts;
}
function getPosts ( poet ) { if ( poet . cache . posts ) return poet . cache . posts ; var posts = utils . sortPosts ( poet . posts ) . filter ( function ( post ) { // Filter out draft posts if showDrafts is false return ( poet . options . showDrafts || ! post . draft ) && // Filter out posts in the future if showFuture is false ( poet . options . showFuture || post . date < Date . now ( ) ) ; } ) ; return poet . cache . posts = posts ; }
Takes a `poet` instance and returns the posts in sorted, array form

@params {Object} poet
@returns {Array}
Takes a poet instance and returns the posts in sorted array form