amccloud/backbone-bindings — pull request #5 by bendangelo (2012-09-30 03:20:12+00:00)
Title: Get / Set Object

I changed the way a getter and setter transformer is defined. Passing an array like that is confusing so I changed it to an object. Example:

Old way:

var yesNoTransformer = [function(value) {
return value === "yes";
}, function(value) {
return (value) ? "yes" : "no";
}];

New way:

var yesNoTransformer = {
set: function(value) {
return value === "yes";
},
get: function(value) {
return (value) ? "yes" : "no";
}
};