function copyFilesMatchSync(match, source, destination) {
  fs.readdirSync(source).forEach(function eachTemplate(filename) {
    var sourceFile = path.join(source, filename);
    var destinationFile = path.join(destination, filename);
    if (match.test(path.basename(filename))) {
      fs.writeFileSync(destinationFile, fs.readFileSync(sourceFile));
    }
  });
}
function copyFilesMatchSync(match, source, destination) {
  fs.readdirSync(source).forEach(function eachTemplate(filename) {
    var sourceFile = path.join(source, filename);
    var destinationFile = path.join(destination, filename);
    if (match.test(path.basename(filename))) {
      fs.writeFileSync(destinationFile, fs.readFileSync(sourceFile));
    }
  });
}
function copyFilesMatchSync ( match , source , destination ) { fs . readdirSync ( source ) . forEach ( function eachTemplate ( filename ) { var sourceFile = path . join ( source , filename ) ; var destinationFile = path . join ( destination , filename ) ; if ( match . test ( path . basename ( filename ) ) ) { fs . writeFileSync ( destinationFile , fs . readFileSync ( sourceFile ) ) ; } } ) ; }
If there are any files in the source folder that are a match copy them to the destination.
@param match
@param source
@param destination
If there are any files in the source folder that are a match copy them to the destination .