addLiveHelper
Register a helper that gets passed values.
stache.addLiveHelper(name, helper)
Registers a helper with stache that always gets passed the arguments it is passed (without being converted to values or wrapped in computes). Pass the name of the helper followed by the function to invoke.
See Helpers for more details on using helpers, addHelper to get passed values for arguments, and registerHelper to get computes for observable values.
stache.addLiveHelper("upper", function(str){
if (canReflect.isObservable(str) && canReflect.isValueLike(str)) {
str = canReflect.getValue(str);
}
return str.toUpperCase();
});
Parameters
- name
{String}
:The name of the helper.
- helper
{simpleHelper(arg..., options)}
:The helper function.