Skip to content

Introduce EventEmitter#listenerCount and deprecate EventEmitter.listenerCount #734

@tellnes

Description

@tellnes

The listenerCount method was introduced (75305f3) for performance reasons after EventEmitter#listeners started to return a copy of the listeners array (nodejs/node-v0.x-archive#3442). It was added as a static method because of problems with backwards compatibility when the domain field was introduced to EventEmitter (nodejs/node-v0.x-archive#5310).

Now that we are somewhat less strict about this and is introducing other new methods (2931348) on the prototype for EventEmitter, maybe we could clean up this api?

(You guys who was involved in this, feel free to correct me on the historical details)

Metadata

Metadata

Assignees

No one assigned

    Labels

    eventsIssues and PRs related to the events subsystem / EventEmitter.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions