_inherit-if-required.js 337 B

123456789
  1. var isObject = require('./_is-object');
  2. var setPrototypeOf = require('./_set-proto').set;
  3. module.exports = function (that, target, C) {
  4. var S = target.constructor;
  5. var P;
  6. if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {
  7. setPrototypeOf(that, P);
  8. } return that;
  9. };