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

makeIterator() return an iterable object #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

piranna
Copy link

@piranna piranna commented May 27, 2021

This fixes #12 and allow to use for..of and array spread.

This fixes villadora#12 and allow to use `for..of` and array spread.
@piranna
Copy link
Author

piranna commented Jul 13, 2021

Any update on this? I can maintain the project if given permissions.

@piranna
Copy link
Author

piranna commented Aug 24, 2021

any update on this?

@maximilianMairinger
Copy link

Would love to see this merged

@maximilianMairinger
Copy link

Maybe consider making this backward compatible by only adding support for Symbol.iterator when the runtime supports it. I don't really think this should be necessary today, but seeing as this library also tries to support runtimes without Map it may be reasonable to continue this trend.

@maximilianMairinger
Copy link

maximilianMairinger commented May 16, 2022

Also consider adding an Iterator over the whole map, as the native map implements

for (const [key, val] of map) 

@piranna
Copy link
Author

piranna commented May 16, 2022

Would love to see this merged

I doubt that would happen, repo owner is shown as innactive for three years...

Maybe consider making this backward compatible by only adding support for Symbol.iterator when the runtime supports it. I don't really think this should be necessary today, but seeing as this library also tries to support runtimes without Map it may be reasonable to continue this trend.

In fact, I would move the other way, remove backwards compatibility and make code smaller and simpler, if you want to use in older browsers then use a polyfill.

Also consider adding an Iterator over the whole map

Not a bad idea, just only Map preserve order, so we would need to use an Array for doing so. What I'm not so sure is about keep using an array for each entry or replace for a Set...

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.

values() is not a function or its return value is not iterable
2 participants