Skip to content

Commit

Permalink
Emitting "done" event
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Sep 26, 2010
1 parent b142cf8 commit bd7cd42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ var Log = require('../lib/log')

log.on('line', function(line){
console.log(line);
});
}).on('end', function(){
console.log('done');
});;
2 changes: 2 additions & 0 deletions lib/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ Log.prototype = {
self.emit('line', obj);
});
buf = '';
}).on('end', function(){
self.emit('end');
});
},

Expand Down

0 comments on commit bd7cd42

Please sign in to comment.