_is_native_reflect_construct.js 503 B

12345678910111213141516
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = _isNativeReflectConstruct;
  6. function _isNativeReflectConstruct() {
  7. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  8. if (Reflect.construct.sham) return false;
  9. if (typeof Proxy === "function") return true;
  10. try {
  11. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
  12. return true;
  13. } catch (e) {
  14. return false;
  15. }
  16. }