足力健前端,vue版本

runtime-module.js 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * Copyright (c) 2014-present, Facebook, Inc.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. // This method of obtaining a reference to the global object needs to be
  8. // kept identical to the way it is obtained in runtime.js
  9. var g = (function() {
  10. return this || (typeof self === "object" && self);
  11. })() || Function("return this")();
  12. // Use `getOwnPropertyNames` because not all browsers support calling
  13. // `hasOwnProperty` on the global `self` object in a worker. See #183.
  14. var hadRuntime = g.regeneratorRuntime &&
  15. Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
  16. // Save the old regeneratorRuntime in case it needs to be restored later.
  17. var oldRuntime = hadRuntime && g.regeneratorRuntime;
  18. // Force reevalutation of runtime.js.
  19. g.regeneratorRuntime = undefined;
  20. module.exports = require("./runtime");
  21. if (hadRuntime) {
  22. // Restore the original runtime.
  23. g.regeneratorRuntime = oldRuntime;
  24. } else {
  25. // Remove the global property added by runtime.js.
  26. try {
  27. delete g.regeneratorRuntime;
  28. } catch(e) {
  29. g.regeneratorRuntime = undefined;
  30. }
  31. }