/Bevent

client event driven system as node module

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

Bevent

From node module to window global

import Bevent from 'bevent.js';
window.Bevent = Bevent;

Usage

Bevent.on('myevent', function(){
  // code
});
Bevent.trigger('myevent'); 

Usage with payload

Bevent.on('myevent', function(data){
  // code
});
Bevent.trigger('myevent', data);