Handlebars:
Template
{{firstname}} {{loud lastname}}
Preparation-Script
Handlebars.registerHelper('loud', function (aString) {
    return aString.toUpperCase()
})
Input
{ firstname: "张", lastname: "三" }
Output
张 三