Urara-Blog/node_modules/.pnpm-store/v3/files/f6/7bb57728640e96c0bbf3be73627aaa305791e38dea844c6e19e1bd990c7716f626153ce957c56610ce2b00479af17c44c6ef2317539ac65a869b95a8318b4c
2022-08-14 01:14:53 +08:00

22 lines
No EOL
906 B
Text

var setPrototypeOf = require("./setPrototypeOf.js");
var isNativeReflectConstruct = require("./isNativeReflectConstruct.js");
function _construct(Parent, args, Class) {
if (isNativeReflectConstruct()) {
module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
} else {
module.exports = _construct = function _construct(Parent, args, Class) {
var a = [null];
a.push.apply(a, args);
var Constructor = Function.bind.apply(Parent, a);
var instance = new Constructor();
if (Class) setPrototypeOf(instance, Class.prototype);
return instance;
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
}
return _construct.apply(null, arguments);
}
module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;