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

suggestion: entries(observableMap) #1416

Closed
xaviergonz opened this issue Mar 15, 2018 · 10 comments
Closed

suggestion: entries(observableMap) #1416

xaviergonz opened this issue Mar 15, 2018 · 10 comments

Comments

@xaviergonz
Copy link
Contributor

Would go great alongside the new values(), and keys()

@mweststrate
Copy link
Member

mweststrate commented Mar 15, 2018 via email

@xaviergonz
Copy link
Contributor Author

Yep, but I guess entries (as well as its values and keys friends) is an optimized version that doesn't try to create an array if it is already an array?

@sorenhoyer
Copy link

sorenhoyer commented Mar 16, 2018

If there's any performance improvement in entries() as opposed to Array.from(map) then I definitely agree.

Just a heads up: https://jsperf.com/set-iterator-vs-foreach/4

We should probably use array spread syntax [...myMap.values()] instead of array.from, since it seems to be much better optimized for both current and especially the upcoming browsers (look at the huge performance improvement in current bleeding edge chrome 67 canarian - just verified it)

@mweststrate
Copy link
Member

PR is welcome for this one! Should be pretty straight forward :)

@samjacobclift
Copy link

Is this not already implemented here? Or am I missing something?

@quanganhtran
Copy link
Member

Should the issue be resolved already? @xaviergonz

@mweststrate
Copy link
Member

mweststrate commented May 4, 2018 via email

@samjacobclift
Copy link

I see I’ll give the implementation a go!

@samjacobclift
Copy link

here is the PR 👍 #1536

@mweststrate
Copy link
Member

Released in 4.3.0

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

5 participants