Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Register listener to all events #23

@rahatarmanahmed

Description

@rahatarmanahmed

I figure I could make another package myself or monkeypatch for my own needs, but I wanted to see if anyone was open to the idea of adding this to Emitter.

It would be nice if Emitter had a onAny method that worked the same as on, but listeners registered would be triggered when any event is emitted.

The only issue I can see with this is that listeners could not be called in the order they were subscribed (i.e., all onAny listeners will be invoked before the on listeners). I don't think Emitter makes any guarantees about callback order, but it's understandable if this is too much of a surprise for users of Emitter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions