You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
439 B
17 lines
439 B
4 years ago
|
export default function _asyncIterator(iterable) {
|
||
|
var method;
|
||
|
|
||
|
if (typeof Symbol !== "undefined") {
|
||
|
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");
|
||
|
}
|