summaryrefslogtreecommitdiff
path: root/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js')
-rw-r--r--node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js37
1 files changed, 17 insertions, 20 deletions
diff --git a/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js b/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
index 43d0ded7..15bf78f5 100644
--- a/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
+++ b/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
@@ -2,29 +2,26 @@ import getPrototypeOf from "./getPrototypeOf.js";
import setPrototypeOf from "./setPrototypeOf.js";
import isNativeFunction from "./isNativeFunction.js";
import construct from "./construct.js";
-export default function _wrapNativeSuper(Class) {
- var _cache = typeof Map === "function" ? new Map() : undefined;
- _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 _wrapNativeSuper(t) {
+ var r = "function" == typeof Map ? new Map() : void 0;
+ return _wrapNativeSuper = function _wrapNativeSuper(t) {
+ if (null === t || !isNativeFunction(t)) return t;
+ if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
+ if (void 0 !== r) {
+ if (r.has(t)) return r.get(t);
+ r.set(t, Wrapper);
}
function Wrapper() {
- return construct(Class, arguments, getPrototypeOf(this).constructor);
+ return construct(t, arguments, getPrototypeOf(this).constructor);
}
- Wrapper.prototype = Object.create(Class.prototype, {
+ return Wrapper.prototype = Object.create(t.prototype, {
constructor: {
value: Wrapper,
- enumerable: false,
- writable: true,
- configurable: true
+ enumerable: !1,
+ writable: !0,
+ configurable: !0
}
- });
- return setPrototypeOf(Wrapper, Class);
- };
- return _wrapNativeSuper(Class);
-} \ No newline at end of file
+ }), setPrototypeOf(Wrapper, t);
+ }, _wrapNativeSuper(t);
+}
+export { _wrapNativeSuper as default }; \ No newline at end of file