preprocessors/index.js
function applicable(filepath, info, callback) {
  const q = queue();
  preprocessors.forEach((preprocessor) => {
    q.defer(preprocessor.criteria, filepath, info);
  });

  q.awaitAll((err, results) => {
    if (err) return callback(err);
    callback(null, preprocessors.filter((preprocessor, i) => {
      return !!results[i];
    }));
  });
}
function applicable(filepath, info, callback) {
  const q = queue();
  preprocessors.forEach((preprocessor) => {
    q.defer(preprocessor.criteria, filepath, info);
  });

  q.awaitAll((err, results) => {
    if (err) return callback(err);
    callback(null, preprocessors.filter((preprocessor, i) => {
      return !!results[i];
    }));
  });
}
function applicable ( filepath , info , callback ) { const q = queue ( ) ; preprocessors . forEach ( ( preprocessor ) => { q . defer ( preprocessor . criteria , filepath , info ) ; } ) ; q . awaitAll ( ( err , results ) => { if ( err ) return callback ( err ) ; callback ( null , preprocessors . filter ( ( preprocessor , i ) => { return ! ! results [ i ] ; } ) ) ; } ) ; }
A function that checks a file against each preprocessor's criteria callback returns only those applicable to this file
A function that checks a file against each preprocessor s criteria callback returns only those applicable to this file