Sha256: 06ad1294f5af550b26531565554d98258205f1223e1506493375815c72b2111f

Contents?: true

Size: 1.22 KB

Versions: 13

Compression:

Stored size: 1.22 KB

Contents

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = _wrapNativeSuper;
var _getPrototypeOf = require("getPrototypeOf");
var _setPrototypeOf = require("setPrototypeOf");
var _isNativeFunction = require("isNativeFunction");
var _construct = require("construct");
function _wrapNativeSuper(Class) {
  var _cache = typeof Map === "function" ? new Map() : undefined;
  exports.default = _wrapNativeSuper = function _wrapNativeSuper(Class) {
    if (Class === null || !_isNativeFunction(Class)) return Class;
    if (typeof Class !== "function") {
      throw new TypeError("Super expression must either be null or a function");
    }
    if (typeof _cache !== "undefined") {
      if (_cache.has(Class)) return _cache.get(Class);
      _cache.set(Class, Wrapper);
    }
    function Wrapper() {
      return _construct(Class, arguments, _getPrototypeOf(this).constructor);
    }
    Wrapper.prototype = Object.create(Class.prototype, {
      constructor: {
        value: Wrapper,
        enumerable: false,
        writable: true,
        configurable: true
      }
    });
    return _setPrototypeOf(Wrapper, Class);
  };
  return _wrapNativeSuper(Class);
}

//# sourceMappingURL=wrapNativeSuper.js.map

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
immosquare-cleaner-0.1.51 node_modules/jscodeshift/node_modules/@babel/core/node_modules/@babel/helpers/lib/helpers/wrapNativeSuper.js
immosquare-cleaner-0.1.50 node_modules/jscodeshift/node_modules/@babel/core/node_modules/@babel/helpers/lib/helpers/wrapNativeSuper.js
immosquare-cleaner-0.1.49 node_modules/jscodeshift/node_modules/@babel/core/node_modules/@babel/helpers/lib/helpers/wrapNativeSuper.js
immosquare-cleaner-0.1.48 node_modules/jscodeshift/node_modules/@babel/core/node_modules/@babel/helpers/lib/helpers/wrapNativeSuper.js
immosquare-cleaner-0.1.47 node_modules/@babel/helpers/lib/helpers/wrapNativeSuper.js
immosquare-cleaner-0.1.46 node_modules/@babel/helpers/lib/helpers/wrapNativeSuper.js
immosquare-cleaner-0.1.45 node_modules/@babel/helpers/lib/helpers/wrapNativeSuper.js
immosquare-cleaner-0.1.44 node_modules/@babel/helpers/lib/helpers/wrapNativeSuper.js
immosquare-cleaner-0.1.43 node_modules/@babel/helpers/lib/helpers/wrapNativeSuper.js
immosquare-cleaner-0.1.42 node_modules/@babel/helpers/lib/helpers/wrapNativeSuper.js
immosquare-cleaner-0.1.41 node_modules/@babel/helpers/lib/helpers/wrapNativeSuper.js
immosquare-cleaner-0.1.40 node_modules/@babel/helpers/lib/helpers/wrapNativeSuper.js
wice_grid-7.1.0 node_modules/@babel/helpers/lib/helpers/wrapNativeSuper.js