packages/hexo-cli-extras/lib/edit.js
// filter the posts using a category if supplied
filter the posts using a category if supplied
filter the posts using a category if supplied
function filterCategory(posts, cat) {
        var reCat = new RegExp(cat);
        return posts.filter(function filterPosts(post) {
          return post.categories.data.some(function checkRe(postCat) {
            return reCat.test(postCat.name);
          });
        });
      }
function filterCategory ( posts , cat ) { var reCat = new RegExp ( cat ) ; return posts . filter ( function filterPosts ( post ) { return post . categories . data . some ( function checkRe ( postCat ) { return reCat . test ( postCat . name ) ; } ) ; } ) ; }
filter the posts using a category if supplied
filter the posts using a category if supplied