summaryrefslogtreecommitdiff
path: root/node_modules/@babel/runtime/helpers/wrapNativeSuper.js
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2024-08-30 17:21:18 +0800
committerlittleblack111 <littleblack11111@gmail.com>2024-08-30 17:21:18 +0800
commitefbc2ffe6a1ee5ec38a4396305561d6515d0943e (patch)
tree2b4c94f18f2c792dfda813050755d5c0273fae22 /node_modules/@babel/runtime/helpers/wrapNativeSuper.js
parent43acceb75957c880a5ba5a31aae221394a36d5f6 (diff)
node fixes, updates
Diffstat (limited to 'node_modules/@babel/runtime/helpers/wrapNativeSuper.js')
-rw-r--r--node_modules/@babel/runtime/helpers/wrapNativeSuper.js34
1 files changed, 15 insertions, 19 deletions
diff --git a/node_modules/@babel/runtime/helpers/wrapNativeSuper.js b/node_modules/@babel/runtime/helpers/wrapNativeSuper.js
index b6ea60c6..acd87aba 100644
--- a/node_modules/@babel/runtime/helpers/wrapNativeSuper.js
+++ b/node_modules/@babel/runtime/helpers/wrapNativeSuper.js
@@ -2,30 +2,26 @@ var getPrototypeOf = require("./getPrototypeOf.js");
var setPrototypeOf = require("./setPrototypeOf.js");
var isNativeFunction = require("./isNativeFunction.js");
var construct = require("./construct.js");
-function _wrapNativeSuper(Class) {
- var _cache = typeof Map === "function" ? new Map() : undefined;
- module.exports = _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 module.exports = _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);
- }, module.exports.__esModule = true, module.exports["default"] = module.exports;
- return _wrapNativeSuper(Class);
+ }), setPrototypeOf(Wrapper, t);
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports, _wrapNativeSuper(t);
}
module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file