Tiny (<0.5 kb) publish/subscribe
npm install nano-pubsub
import createPubsub from 'nano-pubsub'
const events = createPubsub()
const unsubscribe = events.subscribe(value => {
console.log('got value:', value)
})
events.publish('Hello')
// => 'got value: Hello'
events.publish('World')
// => 'got value: World'
unsubscribe()
events.publish('Something')
// ...nothing