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

Map.entries, Map.keys and Map.values should return iterator instead of array #357

Closed
mweststrate opened this issue Jun 23, 2016 · 4 comments

Comments

@mweststrate
Copy link
Member

See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/values

for backward compatibility, return both an array and iterator in the 2.0 branch?

@benjamingr
Copy link
Member

You can return an iterator and have a third party library for the old behavior or map?

I think the library should make objects as indistinguishable from regular objects as possible.

@mweststrate
Copy link
Member Author

released as 3.5.6 already.

@Jony-Y
Copy link

Jony-Y commented Dec 17, 2017

@mweststrate why change them into iterator and not an array? as arrays you can easily user filter, slice, find , etc... what is the benefit of returning a MapIterator?

@benjamingr
Copy link
Member

@Jony-Y spec compliance with regular ES6 maps.

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

No branches or pull requests

3 participants