Skip to content

Commit

Permalink
Add default delimiter to the prototype so it can be discovered reliab…
Browse files Browse the repository at this point in the history
…ly via emitter.delimiter
  • Loading branch information
ksdlck committed Jan 14, 2012
1 parent b22c357 commit 01b6e0b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/eventemitter2.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@
}

function configure(conf) {

if (conf) {
this.wildcard = conf.wildcard;
this.delimiter = conf.delimiter || '.';

conf.delimiter && (this.delimiter = conf.delimiter);
conf.wildcard && (this.wildcard = conf.wildcard);
if (this.wildcard) {
this.listenerTree = new Object;
}
Expand Down Expand Up @@ -197,6 +195,8 @@
// Obviously not all Emitters should be limited to 10. This function allows
// that to be increased. Set to zero for unlimited.

EventEmitter.prototype.delimiter = '.';

EventEmitter.prototype.setMaxListeners = function(n) {
this._events || init.call(this);
this._events.maxListeners = n;
Expand Down

0 comments on commit 01b6e0b

Please sign in to comment.