wdavidw/node-csv — pull request #122 by azylman (2013-07-29 18:15:16+00:00)
Title: setImmediate instead of nextTick for node >=0.10

You're supposed to use `setImmediate` in node >=0.10 instead of `process.nextTick`. The test cases were only passing because none of them tested on more documents than `process.maxTickDepth` (by default 1000). If you run on more documents than that, it crashes with `RangeError: maximum call stack size exceeded`.

I artificially lowered `process.maxTickDepth` in one of the test cases to generate a failing test case, then changed all instances of `process.nextTick` to use `setImmediate` where available and verified that the test cases are passing again.

I didn't submit any of the compiled js because my version of coffee-script is different than your's so there were a lot of diffs that were just white noise.