source: trip-planner-front/node_modules/@babel/runtime/helpers/createSuper.js@ 1ad8e64

Last change on this file since 1ad8e64 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 789 bytes
Line 
1var getPrototypeOf = require("./getPrototypeOf.js");
2
3var isNativeReflectConstruct = require("./isNativeReflectConstruct.js");
4
5var possibleConstructorReturn = require("./possibleConstructorReturn.js");
6
7function _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
24module.exports = _createSuper;
25module.exports["default"] = module.exports, module.exports.__esModule = true;
Note: See TracBrowser for help on using the repository browser.