npm.io
1.1.6 • Published 8 years ago

yeah

Licence
MIT
Version
1.1.6
Deps
0
Vulns
0
Weekly
0
Stars
1

Yeah

Yet another event handler (AKA Sub/Pub). What seperates Yeah from other Sub/Pub helpers is it provides two key features to help deal with event heavy applications; Compound events and Latched events.

window.yeh = window.yeh || [];

yeh.push(['compound', 'app.ready', ['dom.ready','yeh.ready']]);

window.yeh = yeah('yeh', {
  initialize: function() {
    console.log('Start the application!');
  }
});

$(document).domready(yeh.callMeMaybe('dom.ready'));
yeh.on('app.ready', yeh.initialize);

Keywords