Permalink
Browse files

updated documentation

  • Loading branch information...
1 parent 897f917 commit 89c65b17e04d965d569d549afb2c371526919607 @adrai committed Dec 18, 2011
Showing with 17 additions and 0 deletions.
  1. +17 −0 README.markdown
View
@@ -30,6 +30,9 @@ Project goal is to provide a simple command/event handling for evented systems l
// pass in events from your bus
bus.on('events', function(data){
hub.emit('events', data);
+
+ // use it with wildcards for mulit callback
+ // hub.emit('event:' + data.event, data);
});
// pass commands to bus
@@ -57,6 +60,20 @@ Project goal is to provide a simple command/event handling for evented systems l
});
+
+ // if you want to observe the command that generates any events pass an object like this:
+ cmd.emit({
+
+ event1: function(evt) {
+
+ },
+
+ event2: function(evt) {
+
+ }
+
+ });
+
# License
Copyright (c) 2012 Adriano Raiano

0 comments on commit 89c65b1

Please sign in to comment.