Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
MR414N-ID
GitHub Repository: MR414N-ID/botku2
Path: blob/master/node_modules/@babel/runtime/helpers/createSuper.js
1126 views
1
var getPrototypeOf = require("./getPrototypeOf.js");
2
3
var isNativeReflectConstruct = require("./isNativeReflectConstruct.js");
4
5
var possibleConstructorReturn = require("./possibleConstructorReturn.js");
6
7
function _createSuper(Derived) {
8
var hasNativeReflectConstruct = isNativeReflectConstruct();
9
return function _createSuperInternal() {
10
var Super = getPrototypeOf(Derived),
11
result;
12
13
if (hasNativeReflectConstruct) {
14
var NewTarget = getPrototypeOf(this).constructor;
15
result = Reflect.construct(Super, arguments, NewTarget);
16
} else {
17
result = Super.apply(this, arguments);
18
}
19
20
return possibleConstructorReturn(this, result);
21
};
22
}
23
24
module.exports = _createSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
25