lib/templating.js
function templateIsUsable(self, filteredFile) {
  var filters = self.config.get('filters');
  var enabledFilters = [];
  for (var key in filters) {
    if (filters[key]) { enabledFilters.push(key); }
  }
  var matchedFilters = self._.intersection(filteredFile.filters, enabledFilters);
  // check that all filters on file are matched
  if (filteredFile.filters.length && matchedFilters.length !== filteredFile.filters.length) {
    return false;
  }
  return true;
}
function templateIsUsable(self, filteredFile) {
  var filters = self.config.get('filters');
  var enabledFilters = [];
  for (var key in filters) {
    if (filters[key]) { enabledFilters.push(key); }
  }
  var matchedFilters = self._.intersection(filteredFile.filters, enabledFilters);
  // check that all filters on file are matched
  if (filteredFile.filters.length && matchedFilters.length !== filteredFile.filters.length) {
    return false;
  }
  return true;
}
function templateIsUsable ( self , filteredFile ) { var filters = self . config . get ( 'filters' ) ; var enabledFilters = [ ] ; for ( var key in filters ) { if ( filters [ key ] ) { enabledFilters . push ( key ) ; } } var matchedFilters = self . _ . intersection ( filteredFile . filters , enabledFilters ) ; // check that all filters on file are matched if ( filteredFile . filters . length && matchedFilters . length !== filteredFile . filters . length ) { return false ; } return true ; }
Check whether or not a template is usable based on filters
@param  {Object} self         - the generator
@param  {Object} filteredFile - the processed template object
@return {Boolean}             - whether the template is usable based on filters
Check whether or not a template is usable based on filters