Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed May 10, 2012
1 parent 05d95f0 commit 441b438
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions index.js
Expand Up @@ -99,6 +99,14 @@ Emitter.prototype.emit = function(event){
return this;
};

/**
* Check if this emitter has `event` handlers.
*
* @param {String} event
* @return {Boolean}
* @api public
*/

Emitter.prototype.has = function(event){
var fns = this.callbacks[event];
return !!(fns && fns.length);
Expand Down

0 comments on commit 441b438

Please sign in to comment.