The perfect API

Imagine for a second that everything had the same interface. Everything. If this API is going to handle every situation, its surface area can't be used conditionally. E.g. we don't use certain parts for certain problem domains. Every part must be useful for every problem domain. It sounds like…

Line-by-line processing in node

Without 3rd party extensions! What you need are the fs, readline and stream module. var fs = require('fs'), readline = require('readline'), stream = require('stream'); var instream = fs.createReadStream('your/file'), outstream = new stream, rl = readline.createInterface(instream, outstream); rl.on('line', function(line) { // process line here }); rl.on('close', function(…