3.2.0 • Published 15 days ago
@nextcloud/event-bus v3.2.0
@nextcloud/event-bus
A simple event bus to communicate between Nextcloud components.
Installation
npm install @nextcloud/event-bus --save
yarn add @nextcloud/event-bus
Usage
import { emit, subscribe, unsubscribe } from '@nextcloud/event-bus'
const h = e => console.info(e)
subscribe('a', h)
subscribe('b', h)
emit('a', {
data: 123,
})
unsubscribe('a', h)
unsubscribe('b', h)
Naming convention
To stay consistent, we encourage you to use the following syntax when declaring events
app-id:object:verb
Examples:
nextcloud:unified-search:closed
files:node:uploading
files:node:uploaded
files:node:deleted
contacts:contact:deleted
calendar:event:created
forms:answer:updated
Development
npm install
npm run build
npm run test
Requirements
3.2.0
15 days ago
3.1.0
12 months ago
3.0.2
2 years ago
3.0.1
2 years ago
3.0.0
2 years ago
2.1.1
3 years ago
2.1.0
3 years ago
1.3.0
3 years ago
2.0.0
3 years ago
1.2.0
4 years ago
1.1.4
4 years ago
1.1.3
4 years ago
1.1.2
4 years ago
1.1.1
4 years ago
1.1.0
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago
0.2.1
5 years ago
0.2.0
5 years ago
0.1.0
5 years ago