isAsyncIterable
Is your feature request related to a problem? Please describe.
Checks whether the passed value is async iterable.
Describe the solution you'd like
const myAsyncIterable = new Object();
myAsyncIterable[Symbol.asyncIterator] = async function*() {
yield "hello";
yield "async";
yield "iteration!";
};
RA.isAsyncIterable(['arrays', 'are', 'iterable']); //=> false
RA.isAsyncIterable(myAsyncIterable); //=> true
Describe alternatives you've considered
--
Additional context
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/asyncIterator
Hi @char0n , can you assign this to me? I already have this feature implemented.
@sigfriedCub1990, assigned, I'll look into the PR shortly.
What is a use case for this? I do not see the necessity for this feature tbh. Does RA support async iterators for map, filter, etc.?
@levino it's just a simple predicate that tell you if the input value is async iterable or not.
Does RA support async iterators for map, filter, etc.?
RA doesn't support async interators for map, filter and others. As mentioned, it's just a predicate.