Last change
on this file since 1ad8e64 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
580 bytes
|
Line | |
---|
1 | function _asyncIterator(iterable) {
|
---|
2 | var method;
|
---|
3 |
|
---|
4 | if (typeof Symbol !== "undefined") {
|
---|
5 | if (Symbol.asyncIterator) method = iterable[Symbol.asyncIterator];
|
---|
6 | if (method == null && Symbol.iterator) method = iterable[Symbol.iterator];
|
---|
7 | }
|
---|
8 |
|
---|
9 | if (method == null) method = iterable["@@asyncIterator"];
|
---|
10 | if (method == null) method = iterable["@@iterator"];
|
---|
11 | if (method == null) throw new TypeError("Object is not async iterable");
|
---|
12 | return method.call(iterable);
|
---|
13 | }
|
---|
14 |
|
---|
15 | module.exports = _asyncIterator;
|
---|
16 | module.exports["default"] = module.exports, module.exports.__esModule = true; |
---|
Note:
See
TracBrowser
for help on using the repository browser.