function Base() {
}
function Derived() {
}
function createPrototype(base) {
  function f() {
  }
  f.prototype = Base.prototype;
  return new f;
}
function Derived() {
}
Derived.prototype = createPrototype(Base);

var d = new Derived;
console.log(d instanceof Base);
