diff options
Diffstat (limited to 'node_modules/@babel/runtime/helpers/builtin/asyncIterator.js')
| -rw-r--r-- | node_modules/@babel/runtime/helpers/builtin/asyncIterator.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/node_modules/@babel/runtime/helpers/builtin/asyncIterator.js b/node_modules/@babel/runtime/helpers/builtin/asyncIterator.js new file mode 100644 index 00000000..c1a1b313 --- /dev/null +++ b/node_modules/@babel/runtime/helpers/builtin/asyncIterator.js @@ -0,0 +1,19 @@ +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"); +} + +module.exports = _asyncIterator;
\ No newline at end of file |
