joyent/node — pull request #6693 by piscisaureus (2013-12-12 22:30:15+00:00)
Title: EventEmitter: move constructor 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.

The idea was signed off by @isaacs already. Here's the implementation.
suggested reviewers: @trevnorris @tjfontaine