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:
Made everything compatible with JSLint and strict mode
I had to change spaces to tabs. JSLint puked on some indentation, and this was simpler (and my editor was already set to use tabs).
Regex it if you like- :%s/\t/ /g in vim
Moved some things around to make it cleaner (just a few lines, not much)
Updated the README
Bumped the version in package.json
Added a version tag
Everything should be backwards compatible so this should just be a drop-in replacement. I just needed the promise-like functionality.
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:
:%s/\t/ /g
in vimEverything should be backwards compatible so this should just be a drop-in replacement. I just needed the promise-like functionality.