UNPKG

544 BJavaScriptView Raw
1function _inherits(subClass, superClass) {
2 if (typeof superClass !== "function" && superClass !== null) {
3 throw new TypeError("Super expression must either be null or a function");
4 }
5
6 subClass.prototype = Object.create(superClass && superClass.prototype, {
7 constructor: {
8 value: subClass,
9 enumerable: false,
10 writable: true,
11 configurable: true
12 }
13 });
14 if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
15}
16
17module.exports = _inherits;
\No newline at end of file