packages/hexo-cli-extras/lib/edit.js
// filter the posts with the supplied regular expression
filter the posts with the supplied regular expression
filter the posts with the supplied regular expression
function filterTitle(posts, title) {
        var reTitle = title.map(function makeRE(word) {
          return new RegExp(word, 'i');
        });
        return posts.filter(function filterPosts(post) {
          return reTitle.every(function checkRE(regex) {
            return regex.test(post.title) || regex.test(post.slug);
          });
        });
      }
function filterTitle ( posts , title ) { var reTitle = title . map ( function makeRE ( word ) { return new RegExp ( word , 'i' ) ; } ) ; return posts . filter ( function filterPosts ( post ) { return reTitle . every ( function checkRE ( regex ) { return regex . test ( post . title ) || regex . test ( post . slug ) ; } ) ; } ) ; }
filter the posts with the supplied regular expression
filter the posts with the supplied regular expression