Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
MR414N-ID
GitHub Repository: MR414N-ID/botku2
Path: blob/master/node_modules/@babel/runtime/helpers/esm/construct.js
1126 views
1
import setPrototypeOf from "./setPrototypeOf.js";
2
import isNativeReflectConstruct from "./isNativeReflectConstruct.js";
3
export default function _construct(Parent, args, Class) {
4
if (isNativeReflectConstruct()) {
5
_construct = Reflect.construct.bind();
6
} else {
7
_construct = function _construct(Parent, args, Class) {
8
var a = [null];
9
a.push.apply(a, args);
10
var Constructor = Function.bind.apply(Parent, a);
11
var instance = new Constructor();
12
if (Class) setPrototypeOf(instance, Class.prototype);
13
return instance;
14
};
15
}
16
17
return _construct.apply(null, arguments);
18
}
19