events: move EE c'tor guts to EventEmitter.init
authorBert Belder <bertbelder@gmail.com>
Thu, 12 Dec 2013 22:59:40 +0000 (14:59 -0800)
committerBert Belder <bertbelder@gmail.com>
Fri, 20 Dec 2013 20:47:24 +0000 (12:47 -0800)
commit54da818e4bec4e5a0a1928441ec6fc90b4903ba0
tree499c3af3d6ea24741a20bc842960fb53c73158c3
parentf030d8426aa3241ad180c385f15134548579e7ce
events: move EE c'tor guts to EventEmitter.init

After landing 6ed861d it is no longer possible to reliably monkey-patch
the EventEmitter constructor. However there's valid use cases for that,
and makes for easier debugging. Therefore, move the guts of the
constructor to a separate function which is monkey-patchable.

Closes #6693
lib/events.js