Skip to content

Method for syncing emitters #3

@ryanve

Description

@ryanve

I've needed several times a convert a function into a emitter like this. I want to add a method to accommodate this. It would allow plain objects or functions to be made emitter-like by receiving properties (and methods) from the source emitter and thus would share listeners with the source.

My original concept was for the method was emitter.into(target) or static energy.into(target) but due to this shared data perhaps emitter.sync(target) or emitter.share(target) is clearer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions