2.1.4 • Published 9 years ago
subscribr v2.1.4
API
Subscribr.on(eventId, handler)
Subscribe to an event.
Parameters
| Name | Type | Description |
|---|---|---|
| eventId | string | the event ID. |
| handler | function | the callback function. |
Returns
functionSubscription destroyer.
Subscribr.one(eventId, handler)
Subcribe an evento to be executed only once (gets self-destroyed after execution).
Parameters
| Name | Type | Description |
|---|---|---|
| eventId | string | the event ID. |
| handler | function | the callback function. |
Returns
functionSubscription destroyer.
Subscribr.emit(eventId, params)
Emit an event.
Parameters
| Name | Type | Description |
|---|---|---|
| eventId | string | the event ID. |
| params | object | handler params. |
Subscribr.listHandlers(eventId)
List an event's handlers.
Parameters
| Name | Type | Description |
|---|---|---|
| eventId | string | the event ID. |
Returns
arrayEvent handlers.
Subscribr.remove(eventId)
Unsubscribe an event.
Parameters
| Name | Type | Description |
|---|---|---|
| eventId | string | the event ID. |
Subscribr.interceptors
Get interceptors.
Returns
arrayInterceptors.
Subscribr.events
Get events.
Returns
arrayEvents.
Subscribr.all
Get all events and interceptors.
Returns
objectEvents.
2.1.4
9 years ago
2.1.3
9 years ago
2.1.2
9 years ago
2.0.4
9 years ago
2.0.3
9 years ago
2.0.2
9 years ago
2.1.1
9 years ago
2.0.1
9 years ago
2.0.0
9 years ago
1.9.0
9 years ago
1.1.0
9 years ago
1.0.3
9 years ago
1.0.2
9 years ago
1.0.1
9 years ago
1.0.0
9 years ago
0.0.6
9 years ago
0.0.5
9 years ago
0.0.3
9 years ago
0.0.2
9 years ago
0.0.11
9 years ago
0.0.1
9 years ago