0.0.3 • Published 6 years ago
nextcloud-event-bus v0.0.3
nextcloud-event-bus
A event bus to communicate between Nextcloud components
Usage
import { subscribe, unsubscribe, emit } from 'nextcloud-event-bus'
const h = e => console.info(e)
subscribe('a', h)
subscribe('b', h)
emit({
name: 'a',
data: 123,
})
unsubscribe('a', h)
unsubscribe('b', h)