Fabio Manganiello
3923a09831
- Removed some redundant `pass` statements in Z-Wave derived event classes
22 lines
382 B
JavaScript
22 lines
382 B
JavaScript
import mitt from 'mitt'
|
|
|
|
const bus = mitt()
|
|
|
|
bus.publishEntity = (entity) => {
|
|
bus.emit('entity-update', entity)
|
|
}
|
|
|
|
bus.onEntity = (callback) => {
|
|
bus.on('entity-update', callback)
|
|
}
|
|
|
|
bus.publishNotification = (notification) => {
|
|
bus.emit('notification-create', notification)
|
|
}
|
|
|
|
bus.onNotification = (callback) => {
|
|
bus.on('notification-create', callback)
|
|
}
|
|
|
|
export { bus }
|