lib/edit.js
function filterAfter(posts) {
      after = moment(after.replace(/\//g, '-'), 'MM-DD-YYYY', true);
      if (!after.isValid()) {
        console.log(chalk.red('After date is not valid (expecting `MM-DD-YYYY`), ignoring argument.'));
        return posts;
      }

      return posts.filter(function filterPosts(post) {
        return moment(post.date).isAfter(after);
      });
    }
function filterAfter(posts) {
      after = moment(after.replace(/\//g, '-'), 'MM-DD-YYYY', true);
      if (!after.isValid()) {
        console.log(chalk.red('After date is not valid (expecting `MM-DD-YYYY`), ignoring argument.'));
        return posts;
      }

      return posts.filter(function filterPosts(post) {
        return moment(post.date).isAfter(after);
      });
    }
function filterAfter ( posts ) { after = moment ( after . replace ( / \/ / g , '-' ) , 'MM-DD-YYYY' , true ) ; if ( ! after . isValid ( ) ) { console . log ( chalk . red ( 'After date is not valid (expecting `MM-DD-YYYY`), ignoring argument.' ) ) ; return posts ; } return posts . filter ( function filterPosts ( post ) { return moment ( post . date ) . isAfter ( after ) ; } ) ; }
filter the posts using an after date if supplied
filter the posts using an after date if supplied