Skip to content

Separates 'events' support from Backbone in addition to adding TyphonJS extensions.

License

Notifications You must be signed in to change notification settings

typhonjs-backbone/typhonjs-core-backbone-events

Repository files navigation

typhonjs-core-backbone-events

Backbone Documentation Code Style License Gitter

Build Status Coverage Dependency Status

Separates 'Events' support from backbone-es6 in addition to adding TyphonJS extensions found in TyphonEvents. The events dispatch functionality is useful well outside the context of Backbone and is utilized across several TyphonJS repos.

TyphonEvents adds new functionality for triggering events. The following are new trigger mechanisms:

  • triggerDefer - Defers invoking trigger.
  • triggerFirst - Only invokes the first target matched and passes back any result to the callee.
  • triggerResults - Invokes all targets matched and passes back an array of results in an array to the callee.
  • triggerThen - Invokes all targets matched and adds any returned results through Promise.all which returns a single promise to the callee.

mainEventbus.js provides a standardized instance of TyphonEvents which serves as the name implies a main eventbus. In several TyphonJS repos it is mapped via JSPM to 'mainEventbus' such that one can import it via import eventbus from 'mainEventbus';

A typhonjs-core-logging enabled version of TyphonEvents is available in the typhonjs-core-backbone-events-logged repo.

About

Separates 'events' support from Backbone in addition to adding TyphonJS extensions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published