caolan/async — pull request #111 by evanderkoogh (2012-03-08 16:05:16+00:00)
Title: Adding onEach, support for EventEmitters 

I have added a method onEach that takes a couple of parameters to ease working with events.
I have to do a lot of parsing of cvs and xml files and most streaming libraries use events for this.

Internally is registers some events on the emitters and then uses a queue internally to keep track of work.
I have added some tests and some documentation.

Normally I do my programming in Coffeescript in Node, so I might not be aware of some Javascript conventions. This is also my first github pull request, so the same goes for that.

As for my code, there are 2 things I do not like.
- I think like the number of arguments, but I can't think of a good way to make it less
- Internally I use JSON.stringify and JSON.parse, because whenqueue.push sees an Array it assumes there are multiple tasks. Also here I can't find a good way to work around this.