<commit_before>ListView
========

Provides a generic list view for Backbone.js applications<commit_msg>added example to README<commit_after>ListView
========

Provides a generic list view for Backbone.js applications

## Example

```js
var nameCollection = new Backbone.Collection([
  {name: 'Ash'},
  {name: 'Ketchum'}
]);

//single item for the list
var SingleItemView = Backbone.View.extend({
  className: 'list-item',
  events: {
    'click': 'onItemClick'
  },

  render: function() {
    this.$el.html('name: ' + this.model.get('name'));
  },

  onItemClick: function() {
    //did my stuff..
    //any event trigered is sent to the list
    this.trigger('click');
  }
});

//the list
var ListView = Backbone.ListView.extend({
  el: '#container'
});

//init the list
var list = new ListView({
  collection: nameCollection,
  itemView: SingleItemView,
});

list.render();

//watchout for a clicked item on a list
list.on('item:click', function(itemView) {
  alert(itemView.model.get('name'));
});
```
{'fraction_non_alphanumeric': 0.16517412935323383, 'fraction_numerical': 0.0, 'mean_word_length': 4.0049751243781095, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2158469', 'n_tokens_mistral': 330, 'n_tokens_neox': 320, 'n_words': 91}