Skip to content

Commit

Permalink
Formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
stomlinson committed Nov 28, 2011
1 parent cd470ee commit 7094335
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions README.md
Expand Up @@ -6,17 +6,21 @@ This is a little message hub/mediator that is useful to perform global
Include src/hub.js into your project.

### Listening for a message.
// handle is used to turn off the listener.
var handle = Hub.on(`message`, `callback`, [`context`]);

// handle is used to turn off the listener.
var handle = Hub.on(`message`, `callback`, [`context`]);

### Fire a message.
Hub.fire(`message`, [`arg1`], [`arg2`], ..., [`argN`]);

Hub.fire(`message`, [`arg1`], [`arg2`], ..., [`argN`]);

### Remove a listener.
Hub.off(`handle`);

Hub.off(`handle`);

### Resetting the entire hub.
Hub.reset();

Hub.reset();

## License
Available under the Mozilla "Tri-License" - MPL 1.1, GPL 2.0, or LGPL 2.1.
Expand Down

0 comments on commit 7094335

Please sign in to comment.