🌡 An implementation of the Iterator helpers proposal.
Note: This implementation does not strictly follow the proposal. It creates a new base class and works on interfaces (Iterator
, AsyncIterator
, Iterable
, and AsyncIterable
) rather than inheriting from the real, native %IteratorPrototype%
object which is quite awkward to access.
The interesting aspect of this project is it uses Generator
and AsyncGenerator
which makes it super easy to handle iteration operations comparing to writing a next
function ourselves.
See test cases to have a taste of what these helpers do and how to use them.