aboutsummaryrefslogtreecommitdiff
path: root/node_modules/@babel/runtime/helpers/builtin/es6/asyncIterator.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/@babel/runtime/helpers/builtin/es6/asyncIterator.js')
-rw-r--r--node_modules/@babel/runtime/helpers/builtin/es6/asyncIterator.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/node_modules/@babel/runtime/helpers/builtin/es6/asyncIterator.js b/node_modules/@babel/runtime/helpers/builtin/es6/asyncIterator.js
new file mode 100644
index 00000000..c43366eb
--- /dev/null
+++ b/node_modules/@babel/runtime/helpers/builtin/es6/asyncIterator.js
@@ -0,0 +1,17 @@
+export default function _asyncIterator(iterable) {
+ var method;
+
+ if (typeof Symbol === "function") {
+ if (Symbol.asyncIterator) {
+ method = iterable[Symbol.asyncIterator];
+ if (method != null) return method.call(iterable);
+ }
+
+ if (Symbol.iterator) {
+ method = iterable[Symbol.iterator];
+ if (method != null) return method.call(iterable);
+ }
+ }
+
+ throw new TypeError("Object is not async iterable");
+} \ No newline at end of file