npm

Does your artifact manager get in the way? Join us on Oct. 8 at 10am PT, to discuss how npm can help.Sign up »

subscribr

2.1.4 • Public • Published

npm travis dependencies dev dependencies

API

Subscribr.on(eventId, handler)

Subscribe to an event.

Parameters

Name Type Description
eventId string the event ID.
handler function the callback function.

Returns

  • function Subscription 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

  • function Subscription 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

  • array Event handlers.

Subscribr.remove(eventId)

Unsubscribe an event.

Parameters

Name Type Description
eventId string the event ID.

Subscribr.interceptors

Get interceptors.

Returns

  • array Interceptors.

Subscribr.events

Get events.

Returns

  • array Events.

Subscribr.all

Get all events and interceptors.

Returns

  • object Events.

install

npm i subscribr

Downloadsweekly downloads

20

version

2.1.4

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability