component/reactive — pull request #96 by anthonyshort (2013-09-11 12:05:47+00:00)
Title: Added ability to add global formatters

Works the same way bindings work:

```js
reactive.format('mySweetDate', function(val){
return moment(val).format('DD/MM/YYYY');
});
```

They are just normal formatters:

```html

```

And reactive will still use the views formatter first if you need to override it on a view-by-view case:

```js
reactive(el, {}, {
mySweetDate: function(){
return "doh!";
}
});
```

Makes it really easy to reuse formatters across applications

```js
var formatters = require('my-formatters');
var reactive = require('reactive');

reactive.use(formatters);
```

Tried to get local formatters working, but that would require a manual trigger of `reactive.bindAll` by the user.

```js
var view = reactive(el, {});
view.format('data', someDataFunction);
view.bindAll();
```

Otherwise it will complain about the format method not existing. This would require changing the Reactive API.