documentcloud/backbone — pull request #1184 by FrenkyNet (2012-04-04 22:06:52+00:00)
Title: New feature: Model.get fallback callback/value.

When retrieving a value from a model this would be a nice structure to have a fallback, allowing:

var User = new UserModel;

var name = User.get('name', function(){
// Not set? Use email
return this.get('email');
});

Or just pass the default value on the fly

var name = User.get('name', 'Unkown');

Hope you like it.