If you've ever had a generator, or a Set, or a Map that you've needed to map/filter/reduce over in JS, you've been hit
by the pain of having to either convert to an Array with Array.from and then use the method you need, or write a
for...of loop and do your logic in there.
While the for...of loop is almost certainly the "proper" or "js way" of doing things, and is what you normally get as
an answer when searching for this, it can be a little disappointing or jarring for those of us wanting a more fp like
approach that js normally lets you take.
So this package is simply to help facilitate these patterns for IterableIterators.
IteratorFuncs a simple single file package to make working with JS iterators easier.
The documentation lives online here.
If you've ever had a generator, or a Set, or a Map that you've needed to map/filter/reduce over in JS, you've been hit by the pain of having to either convert to an Array with
Array.from
and then use the method you need, or write a for...of loop and do your logic in there.While the for...of loop is almost certainly the "proper" or "js way" of doing things, and is what you normally get as an answer when searching for this, it can be a little disappointing or jarring for those of us wanting a more fp like approach that js normally lets you take.
So this package is simply to help facilitate these patterns for IterableIterators.
tldr: