biojs-events

0.0.4 • Public • Published

event system

This is a convenience wrapper for the Event system.

You can choose any library that supports the choosen syntax.

This wrapper here is for backbone-events-standalone and thus the Backbone event system.

How to use

1. install

npm install biojs-events --save

2. Mix the events capability with your object

After the code of your BioJS component add the events capability by mixing you component object with the events:

require('biojs-events').mixin(my_component);

3. Trigger events

Now in your code you can use the events methods (trigger, off,on,once):

self.trigger('onSomethingChanged', {
 data : "some data to include in your event"
});

Readme

Keywords

Package Sidebar

Install

npm i biojs-events

Weekly Downloads

2,129

Version

0.0.4

License

Apache 2

Last publish

Collaborators

  • greenify
  • emepyc