Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "index"

The library exposes a factory function that creates a courier object and a pre-made courier object where the event target is window.

Index

References

createCourier

Re-exports createCourier

Variables

emit

emit: emit

Fires an event on the event target with the provided name and data

param

an event name

param

data to be sent with this event

emitAndStore

emitAndStore: emitAndStore

Fires an event on the event target with the provided name and data and saves the data in the special event target's store for late subscribers

param

an event name

param

data to be sent with this event

emitAndStoreWithResponse

emitAndStoreWithResponse: emitAndStoreWithResponse

Fires an event on the event target with the provided name and data and provides "sendResponse" function to be (optionally) called by the event listener and saves the data in the special event target's store for late subscribers

param

an event name

param

data to be sent with this event

param

= function to be (optionally) called by the event listener

emitWithResponse

emitWithResponse: emitWithResponse

Fires an event on the event target with the provided name and data and provides "sendResponse" function to be (optionally) called by the event listener

param

an event name

param

data to be sent with this event

param

= function to be (optionally) called by the event listener

on

on: curried | on

It sets an event listener listening to the event with the provided name. The listener called immediately if an event was stored in the target's "courierEventDataStore"

param

an event name

param

function called once the event with this name fired on the event target

returns

function that removes this listener from the event target

once

once: curried | once

It sets an event listener listening to the event with the provided name only once The listener called immediately if an event was stored in the target's "courierEventDataStore"

param

an event name

param

function called once the event with this name fired on the event target

returns

function that removes this listener from the event target

subscribe

subscribe: subscribe

A convenience method that sets event listeners in a bulk

param

an object where keys are event name and values are listeners for those events

returns

object where keys are event name and values are functions called to unsubscribe from those events

Generated using TypeDoc