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

Collection functions should accept objects #13

Closed
aarong opened this issue Feb 23, 2011 · 3 comments
Closed

Collection functions should accept objects #13

aarong opened this issue Feb 23, 2011 · 3 comments

Comments

@aarong
Copy link

aarong commented Feb 23, 2011

I often find myself turning my data objects ({a: 1, b: 2, ...}) into arrays so that I can .map or .forEach them. It would be great if these function could accept objects directly.

@rgabo
Copy link

rgabo commented May 24, 2011

for the record, see issue #26 as well (not exactly a duplicate but same resolution suggested). Would you expect map and forEach to iterate over the keys ('a', 'b', ...) or the values (1, 2, ...)?

@jacobrask
Copy link

Underscore.js gives the iterator the arguments element, index, list if the passed list is an Array, and value, key, list if it is an Object.

@brianmaissy
Copy link
Contributor

This is a duplicate of #168 and should be closed.

@caolan caolan closed this as completed Mar 2, 2013
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