2023-04-04 06:05:47 +03:00
|
|
|
export function _is_native_reflect_construct() {
|
2021-12-05 09:46:09 +03:00
|
|
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
|
|
if (Reflect.construct.sham) return false;
|
|
|
|
if (typeof Proxy === "function") return true;
|
2023-04-04 06:05:47 +03:00
|
|
|
|
2021-12-05 09:46:09 +03:00
|
|
|
try {
|
2023-03-31 09:15:21 +03:00
|
|
|
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
2023-04-04 06:05:47 +03:00
|
|
|
|
2021-12-05 09:46:09 +03:00
|
|
|
return true;
|
|
|
|
} catch (e) {
|
|
|
|
return false;
|
|
|
|
}
|
2023-03-31 09:15:21 +03:00
|
|
|
}
|
2023-04-04 06:05:47 +03:00
|
|
|
export { _is_native_reflect_construct as _ };
|