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.
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 staticenergy.into(target)but due to this shared data perhapsemitter.sync(target)oremitter.share(target)is clearer.