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

Support ES6 Map/Set/WeakMap/WeakSet in _.toArray #1184

Closed
brianmhunt opened this issue May 4, 2015 · 3 comments
Closed

Support ES6 Map/Set/WeakMap/WeakSet in _.toArray #1184

brianmhunt opened this issue May 4, 2015 · 3 comments

Comments

@brianmhunt
Copy link

There is no builtin, widely supported way to create an array from ES6 Map and Set entities (values or keys). Eventually Array.from will solve this problem, but it is not as widely supported as the data structures.

It would be great if _.toArray were able to fill this gap – not just for Map and Set, but for any iterator. Both Set and Map have .forEach properties, and Map also has values and keys. All of these conform to the iterator protocol.

🍻

@jdalton
Copy link
Member

jdalton commented May 4, 2015

Hi @brianmhunt! See #858 and #737.

@jdalton jdalton closed this as completed May 4, 2015
@brianmhunt
Copy link
Author

Thanks - sorry I missed those. Cheers

@lock
Copy link

lock bot commented Jan 20, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants