code: function forward(obj, target, onlyAccessors) {
    onlyAccessors = onlyAccessors || false;
    for (var k in target) {
      (function(k) {
        if (typeof(target[k]) == 'function') {
          if (!onlyAccessors) {
            obj[k] =  target[k].bind(target);
          }
        } else {
          Object.defineProperty(obj, k, {
            get: function() { return target[k]; },
            set: function(x) { target[k] = x; }
          });
        }
      })(k);
    }
  }
docs: Turn obj into a proxy for target. This forwards both function calls and property setters/getters.