index.js
function getNameFromFileName(filename) {
  var file = basename(filename).replace(/\.(?:pug|jade)$/, '');
  return file.toLowerCase().replace(/[^a-z0-9]+([a-z])/g, function (_, character) {
    return character.toUpperCase();
  }) + 'Template';
}
function getNameFromFileName(filename) {
  var file = basename(filename).replace(/\.(?:pug|jade)$/, '');
  return file.toLowerCase().replace(/[^a-z0-9]+([a-z])/g, function (_, character) {
    return character.toUpperCase();
  }) + 'Template';
}
function getNameFromFileName ( filename ) { var file = basename ( filename ) . replace ( / \.(?:pug|jade)$ / , '' ) ; return file . toLowerCase ( ) . replace ( / [^a-z0-9]+([a-z]) / g , function ( _ , character ) { return character . toUpperCase ( ) ; } ) + 'Template' ; }
Get a sensible name for a template function from a file path

@param {String} filename
@returns {String}
Get a sensible name for a template function from a file path