lib/timbits.js
function filteredFiles(folder, pattern) {
  var files = [];
    
  if (fs.existsSync(folder)){
    fs.readdirSync(folder).forEach(function(file) {
      if (file.match(pattern) != null)
        files.push(file);
    });
  }
  return files;
}
function filteredFiles(folder, pattern) {
  var files = [];
    
  if (fs.existsSync(folder)){
    fs.readdirSync(folder).forEach(function(file) {
      if (file.match(pattern) != null)
        files.push(file);
    });
  }
  return files;
}
function filteredFiles ( folder , pattern ) { var files = [ ] ; if ( fs . existsSync ( folder ) ) { fs . readdirSync ( folder ) . forEach ( function ( file ) { if ( file . match ( pattern ) != null ) files . push ( file ) ; } ) ; } return files ; }
retrieve list of matching files in a folder
retrieve list of matching files in a folder