decord/source/4637_getEvalledConstructor.js
2026-08-13 07:00:46 +00:00

45 lines
1 KiB
JavaScript

// Module ID: 4637
// Function ID: 4638
// Name: getEvalledConstructor
// Dependencies: [4638, 4639]
// Module 4637 (getEvalledConstructor)
import DefinePropertyOrThrow from "DefinePropertyOrThrow";
const tmp = require("getEvalledConstructor")("%Reflect.construct%", true);
let c0 = tmp;
try {
let obj = { "[[Get]]": null };
obj[0] = () => {
};
DefinePropertyOrThrow({}, "", obj);
let tmp4 = DefinePropertyOrThrow;
if (tmp4) {
if (tmp) {
let closure_1 = {};
obj = {};
obj = { "[[Get]]": null, "[[Enumerable]]": true };
obj[0] = () => {
throw closure_1;
};
tmp4(obj, "length", obj);
module.exports = function IsConstructor(arg0) {
try {
arg0(arg0, obj);
} catch (tmp5) {
return tmp5 === closure_1;
}
};
}
}
module.exports = function IsConstructor(fn) {
let prototype = typeof fn === "function";
if (typeof fn === "function") {
prototype = fn.prototype;
}
return prototype;
};
} catch (err) {
tmp4 = null;
}