Skip to content

Commit

Permalink
Updating markdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
efeminella committed Apr 17, 2012
1 parent 6a3845a commit 9e7d030
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Provides a general purpose Event Broker implementation to Backbone based on the

### Basic Usage
The `EventBroker` can be used directly to publish and subscribe to events of interest:

``` javascript
var Users = Backbone.Collection.extend{{
broker: Backbone.EventBroker,
Expand All @@ -27,7 +28,6 @@ var UserEditor = Backbone.View.extend({
}
};
// ...

```
### Creating namespaced EventBrokers
Expand Down Expand Up @@ -62,7 +62,6 @@ var UserEditor = Backbone.View.extend({
this.usersBroker.trigger('add', user);
}
};

```
Since namespaced `EventBrokers` ensure events are only piped thru the `EventBroker` of the given namespace, it is not necessary to prefix event names with the specific namespace to which they belong. While this can simplify implementation code, you can still prefix event names to aid in readability if desired.
Expand Down Expand Up @@ -96,7 +95,6 @@ var UserEditor = Backbone.View.extend({
this.usersBroker.trigger('users:add', user);
}
};

```
### Registering Interests
Expand Down Expand Up @@ -124,7 +122,6 @@ var Users = Backbone.Collection.extend(
update: function() { ... },
remove: function() { ...
});

```
Alternately, Modules can simply define an "interests" property containing particular event/callback mappings of interests and register themselves with an `EventBroker`
Expand Down Expand Up @@ -152,5 +149,4 @@ var Users = Backbone.Collection.extend(
update: function() { ... },
remove: function() { ... }
});

```

0 comments on commit 9e7d030

Please sign in to comment.