diff --git a/js/app.js b/js/app.js index 0b597ba5..18d87096 100644 --- a/js/app.js +++ b/js/app.js @@ -7,6 +7,11 @@ app = Sammy('#main', function (sam) { // Plugins sam.use('Handlebars', 'ms'); + Handlebars.registerHelper('ucwords', function(str) { + return (str + '').replace(/^([a-z\u00E0-\u00FC])|\s+([a-z\u00E0-\u00FC])/g, function ($1) { + return $1.toUpperCase(); + }); + }); Handlebars.registerHelper('humanSize', function(bytes) { var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; if (bytes == 0) return 'n/a';