No description
Find a file
2014-03-01 03:28:06 -08:00
examples added ability to remove all events 2014-03-01 03:28:06 -08:00
event-pubsub-browser.js added ability to remove all events 2014-03-01 03:27:59 -08:00
event-pubsub.js added ability to remove all events 2014-03-01 03:23:59 -08:00
LICENSE Initial commit 2014-02-18 13:48:27 -08:00
package.json added ability to remove all events 2014-03-01 03:23:59 -08:00
README.md Update README.md 2014-02-18 21:55:53 -08:00

Event PubSub

Pubsub events for Node and the browser allowing event scoping and multiple scopes. Easy for any developer level. No frills, just high speed pubsub events!


Basic Examples


Node

var events = new require('../../event-pubsub.js')();

events.on(
    'hello',
    function(data){
        console.log('hello event recieved ', data);
    }
);

events.on(
    '*',
    function(type){
        console.log('Catch all detected event type of : ',type, '. List of all the sent arguments ',arguments);
    }
);

/************************************\
 * trigger events for testing
 * **********************************/
events.trigger(
    'hello',
    'world'
);

Browser

HTML
var events = new require('../../event-pubsub.js')();

events.on(
    'hello',
    function(data){
        console.log('hello event recieved ', data);
    }
);

events.on(
    '*',
    function(type){
        console.log('Catch all detected event type of : ',type, '. List of all the sent arguments ',arguments);
    }
);

/************************************\
 * trigger events for testing
 * **********************************/
events.trigger(
    'hello',
    'world'
);