getterSetter
The getterSetter argument passed to registerConverter.
Object
An object with a get
and set
method that get converted to a two-way helper.
stache.registerConverter( "numberToString", {
get: function( fooCompute ) {
return "" + fooCompute();
},
set: function( newVal, fooCompute ) {
fooCompute( +newVal );
}
} );
A getterSetter
object provides:
- A
get
method that returns the value of theleft
value given the arguments passed on theright
. - a
set
method that updates one or multiple of theright
arguments computes given a newleft
value.