caolan/async — pull request #168 by dominicbarnes (2012-08-10 19:58:51+00:00)
Title: Adding forEachOf to Iterate Objects

So, I needed the ability to iterate objects (and get the `key` passed into the iterator) and noticed it was not done because it would break compatibility with the Node.js standard libs. I am proposing this "convention" of adding the `Of` suffix on iterators that deal with objects. (instead of arrays)

If this entire concept is rejected outright, then I'll stop here. However, if this seems like a good idea/convention I can finish up adding the same concept to the other various collection iterators.

Usage:

async.forEachOf({ a: 1, b: 2 }, function (value, key, callback) {
// value = 1, 2
// key = a, b
}, function (err) {
// complete
});