code: function(context, all) {
    return Object.keys(all).reduce(function(bound, key) {
      if (typeof all[key] == 'object') bound[key] = bindAllTo(context, all[key]);
      else if (typeof all[key] == 'function') bound[key] = all[key].bind(context);
      else bound[key] = all[key];
      return bound;
    }, {});
  }
docs: Bind all functions of an object to a context (recursively)