fgnass/domino — pull request #8 by internot (2012-06-28 11:15:53+00:00)
Title: Made an event-driven Parser class

One of the features of the parser is that it can continuosly parse chunks of text. I extended domino with an event-driven Parser class that takes an EventEmitter as argument and parse each chunk as it becomes available. I use it to parse the result of a http request without having to store it in a temporary buffer:

http.request(req, function(pres) {
var parser = new domino.Parser();
parser.parse(pres);
parser.on('end', function() {
var document = parser.document();
...
});
});