INNER CODE UNIT · JavaScript

create

mongoosejs/mquery · lib/utils.js:269

function create(proto) {
  if (arguments.length > 1) {
    throw new Error('Adding properties is not supported');
  }

  function F() { }
  F.prototype = proto;
  return new F;
}

/**
 * inheritance
 */

exports.inherits = function(ctor, superCtor) {
  ctor.prototype = exports.create(superCtor.prototype);
  ctor.prototype.constructor = ctor;
};

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…