crab-event

0.1.0 • Public • Published

Crab Event

Event handler for sync, async and Promise events based on MicroEvent.js.

API

Options

Event.options.methods

The method object contains alternative method names. This is usefull if you want to connect a Crab Event to an existing library with a different Event API. Be default these methods names are used:

{
  _addEventListener: ['on'],
  _removeEventListener: ['off'],
  _once: ['once'],
  _dispatchEvent: ['trigger']
}

Event

Handles a single event.

Events

Handles multiple events using topics.

Readme

Keywords

Package Sidebar

Install

npm i crab-event

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • bergos