Fix iterator protocol support + npm build scripts #44
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #37
replaces #38
Ensured that the
.iterator
and.toIter
methods are compliant with iterator-protocol by adding a self-returningSymbol.iterator
/@@iterator
method to all returned iterators, rather than just those produced byLazyTransformer
. Also added some additional tests to make sure it checks iterators produced fromLazyTransformer
andWrappedIterator
.I noticed that
dist/transducers.js
was already out of date compared to the source code, so I had also added some build and test scripts, as well as aprepublish
script to ensure dist is built before it's published. Let me know if you'd rather that go in a separate PR and I'll gladly remove them, but I figured it would help keep things in sync between the module/global versions. I didn't check in a new version ofdist/transducers.js
, though.