Skip to content

🌡 An implementation of the Iterator helpers proposal

Notifications You must be signed in to change notification settings

code-cb/iterator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@codecb/iterator

🌡 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.

References

  1. [GitHub] tc39/proposal-iterator-helpers
  2. [tc39.es] Iterator Helpers
  3. [2ality] ECMAScript proposal: iterator helpers
  4. [GitHub] nvie/itertools.js
  5. [GitHub] more-itertools/more-itertools
  6. [Rust] Trait std::iter::Iterator
  7. [Python] itertools — Functions creating iterators for efficient looping

About

🌡 An implementation of the Iterator helpers proposal

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published