Skip to content

Instantly share code, notes, and snippets.

@itissid
Created November 24, 2010 23:50
Show Gist options
  • Save itissid/714652 to your computer and use it in GitHub Desktop.
Save itissid/714652 to your computer and use it in GitHub Desktop.
consumer = module.exports = function() {
this.q = [];
this.pr = [];
var self = this;
this.getQ = function(){
return this.q;
};
this.on('consume', function(){
var arr_t = self.q.pop();
});
this.on('add', function(url, docstring){
self.q.push([url, docstring]);
});
};
util.inherits(consumer, EventEmitter);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment