lib/templating.js
function filterFile(template) {
  // Find matches for parans
  var filterMatches = template.match(/\(([^)]+)\)/g);
  var filters = [];
  if (filterMatches) {
    filterMatches.forEach(function(filter) {
      filters.push(filter.replace('(', '').replace(')', ''));
      template = template.replace(filter, '');
    });
  }

  return { name: template, filters: filters };
}
function filterFile(template) {
  // Find matches for parans
  var filterMatches = template.match(/\(([^)]+)\)/g);
  var filters = [];
  if (filterMatches) {
    filterMatches.forEach(function(filter) {
      filters.push(filter.replace('(', '').replace(')', ''));
      template = template.replace(filter, '');
    });
  }

  return { name: template, filters: filters };
}
function filterFile ( template ) { // Find matches for parans var filterMatches = template . match ( / \(([^)]+)\) / g ) ; var filters = [ ] ; if ( filterMatches ) { filterMatches . forEach ( function ( filter ) { filters . push ( filter . replace ( '(' , '' ) . replace ( ')' , '' ) ) ; template = template . replace ( filter , '' ) ; } ) ; } return { name : template , filters : filters } ; }
Parse a filtered filename and return the processed name and filters
@param  {String} template - the file path to the template
@return {Object}          - contains the processed name and filters array
Parse a filtered filename and return the processed name and filters