Spaces:
Running
Running
File size: 363 Bytes
d4b85c0 |
1 2 3 4 5 6 7 8 9 10 11 12 |
/**
* Returns true if the provided object implements the AsyncIterator protocol via
* implementing a `Symbol.asyncIterator` method.
*/
export function isAsyncIterable(maybeAsyncIterable) {
return (
typeof (maybeAsyncIterable === null || maybeAsyncIterable === void 0
? void 0
: maybeAsyncIterable[Symbol.asyncIterator]) === 'function'
);
}
|