hij1nx/EventEmitter2 — Issue #51: setMaxEventListeners: 0 for unlimited not working
Author: finpingvin
Created: 2012-02-08 16:08:37+00:00
State: open

setting 0 as setMaxListeners always gets overridden by the default value, since assignment is like this:
`var m = this._events.maxListeners || defaultMaxListeners;`
and 0 is considered falsy.

since the check that controls wether to show a warning or not is m > 0, -1 is a valid argument to setMaxListeners to prevent warnings, since it isn't considered falsy, but this isn't reflected in the documentation