Projekt

Obecné

Profil

Stáhnout (505 Bajtů) Statistiky
| Větev: | Revize:
1
var setPrototypeOf = require("./setPrototypeOf");
2

    
3
function _inherits(subClass, superClass) {
4
  if (typeof superClass !== "function" && superClass !== null) {
5
    throw new TypeError("Super expression must either be null or a function");
6
  }
7

    
8
  subClass.prototype = Object.create(superClass && superClass.prototype, {
9
    constructor: {
10
      value: subClass,
11
      writable: true,
12
      configurable: true
13
    }
14
  });
15
  if (superClass) setPrototypeOf(subClass, superClass);
16
}
17

    
18
module.exports = _inherits;
(37-37/80)