Socket
Socket
Sign inDemoInstall

biojs-events

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    biojs-events

BioJS event system


Version published
Weekly downloads
2K
decreased by-22.88%
Maintainers
1
Install size
49.6 kB
Created
Weekly downloads
 

Readme

Source

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"
});

Keywords

FAQs

Last updated on 13 Aug 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc