docs: function extend (child, parent) {
      var proto = child.prototype,
          p     = function () {};
      p.prototype = parent.prototype;
      child.prototype = new p();
      for (var i in proto) {
          if (proto.hasOwnProperty(i)) {
              child.prototype[i] = proto[i];
          }
      }
      child.base = parent;
  }