vue-rx icon indicating copy to clipboard operation
vue-rx copied to clipboard

Proposal: subscribeAsEmit helper method

Open paulpdaniels opened this issue 7 years ago • 0 comments

Admittedly a fairly trivial helper, but I know it would help with some boiler plate. And it gives a nice symmetry to the $fromEvent helpers

Basically:

function $subscribeAsEmit (name) {
  return (observable) => observable.subscribe(event => this.$emit(name, event))
}

paulpdaniels avatar Feb 06 '18 02:02 paulpdaniels