nickewing / line-reader

Asynchronous line-by-line file reader for node.js
MIT License
453 stars 75 forks source link

Added promise-like functionality #1

Closed beatgammit closed 13 years ago

beatgammit commented 13 years ago

Thanks so much for your work on this module!!

I made some changes, most of them aesthetic, but I did make one big change; I added promise-like functionality to eachLine.

Now, when you call the eachLine function, you can call .then() and pass a callback, which will get called after the last line has been read. This isn't exactly like promises, but it's pretty close.

I also:

Everything should be backwards compatible so this should just be a drop-in replacement. I just needed the promise-like functionality.

nickewing commented 13 years ago

Thanks for your contribution!