b370485da1b3befef300dabd7932df81d3637c7e036dfd7546fa30f03e360d9859714dc15fc5e3a9f63fa2c84259302ae2d5352767b637073dbcf52300eb29 758 B

12345678910111213141516171819202122232425262728293031
  1. # regenerator-runtime
  2. Standalone runtime for
  3. [Regenerator](https://github.com/facebook/regenerator)-compiled generator
  4. and `async` functions.
  5. To import the runtime as a module (recommended), either of the following
  6. import styles will work:
  7. ```js
  8. // CommonJS
  9. const regeneratorRuntime = require("regenerator-runtime");
  10. // ECMAScript 2015
  11. import regeneratorRuntime from "regenerator-runtime";
  12. ```
  13. To ensure that `regeneratorRuntime` is defined globally, either of the
  14. following styles will work:
  15. ```js
  16. // CommonJS
  17. require("regenerator-runtime/runtime");
  18. // ECMAScript 2015
  19. import "regenerator-runtime/runtime";
  20. ```
  21. To get the absolute file system path of `runtime.js`, evaluate the
  22. following expression:
  23. ```js
  24. require("regenerator-runtime/path").path
  25. ```