Sha256: 45887ce0a16d89cc00a71fcf9e391501e107876c827db04227ad408f8b5beae4

Contents?: true

Size: 673 Bytes

Versions: 5

Compression:

Stored size: 673 Bytes

Contents

import getPrototypeOf from "./getPrototypeOf";
import isNativeReflectConstruct from "./isNativeReflectConstruct";
import possibleConstructorReturn from "./possibleConstructorReturn";
export default function _createSuper(Derived) {
  var hasNativeReflectConstruct = isNativeReflectConstruct();
  return function _createSuperInternal() {
    var Super = getPrototypeOf(Derived),
        result;

    if (hasNativeReflectConstruct) {
      var NewTarget = getPrototypeOf(this).constructor;
      result = Reflect.construct(Super, arguments, NewTarget);
    } else {
      result = Super.apply(this, arguments);
    }

    return possibleConstructorReturn(this, result);
  };
}

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/@babel/runtime/helpers/esm/createSuper.js
tang-0.2.1 spec/tang_app/node_modules/@babel/runtime/helpers/esm/createSuper.js
tang-0.2.0 spec/tang_app/node_modules/@babel/runtime/helpers/esm/createSuper.js
tang-0.1.0 spec/tang_app/node_modules/@babel/runtime/helpers/esm/createSuper.js
tang-0.0.9 spec/tang_app/node_modules/@babel/runtime/helpers/esm/createSuper.js