-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 with Object #689
Comments
I support this idea. Lodash support this feature. |
The idea is to iterate over all keys of object and map the values without creating as result an object with special property. This is to avoid any kind of hellhounds or side effect! |
As a workaround, you can convert your object to an array of async.map(_.pairs(obj), function (tuple, cb) {
var key = tuple[0];
var value = tuple[1];
// do something with key and value
//..
cb(null, [key, newValue]);
}, function (err, result) {
if (err) return callback(err);
callback(null, _.zipObject(result));
}) |
Dupe of #321 |
I'm very happy if async can accept an Object as first parameter of map. The behaviour is like parallel, the result is an object with the same keys of the input.
Are you interested in?
The text was updated successfully, but these errors were encountered: