Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix iterator protocol support + npm build scripts #44

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

jaawerth
Copy link

@jaawerth jaawerth commented Mar 29, 2017

closes #37
replaces #38

Ensured that the .iterator and .toIter methods are compliant with iterator-protocol by adding a self-returning Symbol.iterator/@@iterator method to all returned iterators, rather than just those produced by LazyTransformer. Also added some additional tests to make sure it checks iterators produced from LazyTransformer and WrappedIterator.

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 a prepublish 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 of dist/transducers.js, though.

@ScriptedAlchemy
Copy link

Due to abandonment, I’ve forked this and am actively working on it.

One thing I’d love is the ability to replace the prototype chain with these. So people doesn’t need to know that performance is drastically improved.
https://github.com/ScriptedAlchemy/fast-transducers

@jaawerth
Copy link
Author

jaawerth commented Feb 8, 2022

@ScriptedAlchemy Now that I'm back to being knee-deep in JS-land and finding it hard to find a transducer library that's both tiny and maintained (and with an API that desn't drop me into weird typescript config object0 I finally realized I missed your comment after being like "welp, might as well work from my stale PR." i even saw your package in npm, just hadn't looked into it yet 😆

Anyway, sorry it took me 3 years to notice it, but thanks for dropping me the note!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

no @@iterator method on iterators?
2 participants