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

Object collection transformed to array #1188

Closed
kumavis opened this issue Jun 14, 2016 · 3 comments
Closed

Object collection transformed to array #1188

kumavis opened this issue Jun 14, 2016 · 3 comments

Comments

@kumavis
Copy link

kumavis commented Jun 14, 2016

What version of async are you using?
2.0.0-rc.6
Which environment did the issue occur in (Node version/browser version)
node v4.2.3
What did you do? Please include a minimal reproducible case illustrating issue.

var objCollection = { a: 1, b: 2 }
async.map(objCollection, asyncNoop, logResults)
function asyncNoop(item, cb){
  cb(null,item)
}
function logResults(err, results){
  console.log(results)
}

What did you expect to happen?
I expected to get an object as the result

What was the actual result?
I got an array as the result

@ex1st
Copy link

ex1st commented Jun 14, 2016

It a normal behavior for version v2 #1157

@kumavis
Copy link
Author

kumavis commented Jun 15, 2016

@ex1st thanks

but also meh

@kumavis kumavis closed this as completed Jun 15, 2016
@RobertWHurst
Copy link

RobertWHurst commented Oct 28, 2016

Why? Am I suppose to have to write extra code now to map the results to an object?

Update: If anyone is curious about how to work this objects, there is mapValues instead.

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