isNativeReflectConstruct.js 477 B

1234567891011121314
  1. function _isNativeReflectConstruct() {
  2. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  3. if (Reflect.construct.sham) return false;
  4. if (typeof Proxy === "function") return true;
  5. try {
  6. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  7. return true;
  8. } catch (e) {
  9. return false;
  10. }
  11. }
  12. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;