$ cnpm install transmitter
Dead simple pub-sub
Subscribes to change events. Returns an object which contains the method dispose which removes the current subscription.
Emit a change to all the subscribers.
const bus = transmitter()
bus.subscribe(result => console.log(result))
bus.publish({ foo: 'bar' })
Copyright 2013 - present © cnpmjs.org | Home |