asyncIterator.js 918 B

123456789101112131415161718192021222324
  1. var _Symbol = require("@babel/runtime-corejs3/core-js/symbol");
  2. var _Symbol$asyncIterator = require("@babel/runtime-corejs3/core-js/symbol/async-iterator");
  3. var _Symbol$iterator = require("@babel/runtime-corejs3/core-js/symbol/iterator");
  4. var _getIteratorMethod = require("@babel/runtime-corejs3/core-js/get-iterator-method");
  5. function _asyncIterator(iterable) {
  6. var method;
  7. if (typeof _Symbol !== "undefined") {
  8. if (_Symbol$asyncIterator) method = iterable[_Symbol$asyncIterator];
  9. if (method == null && _Symbol$iterator) method = _getIteratorMethod(iterable);
  10. }
  11. if (method == null) method = iterable["@@asyncIterator"];
  12. if (method == null) method = iterable["@@iterator"];
  13. if (method == null) throw new TypeError("Object is not async iterable");
  14. return method.call(iterable);
  15. }
  16. module.exports = _asyncIterator;
  17. module.exports["default"] = module.exports, module.exports.__esModule = true;