<commit_before>Backstab
==========

Backstab provides enhancements to Backbone.js.

Index
-------
    
- ``Backstab.View``. _&lt;content to come&gt;_
- ``Backstab.Dispatcher``. _&lt;content to come&gt;_
- ``Backstab.StateMachine``. _&lt;content to come&gt;_
- ``Backstab.Foo``. _&lt;content to come&gt;_
- ``Backstab`` (Core). _&lt;content to come&gt;_
- ``Backstab`` (Underscore.js Enhancements). _&lt;content to come&gt;_


Backstab.View
---------------

`Backstab.View` makes a number of enhancements to the standard `Backbone.View` `events` hash.

```javascript

// standard usage
events: {
	'someevent someselector': 'someMethod',
	'otherevent otherselector': 'otherMethod',
	// etc...
}
```

Multiple event/selector combos can be separated using a semi-colon (;) which can target the same 
method.

```javascript

// standard usage
events: {
	'someevent someselector; otherevent otherselector': 'sameMethod'
	// etc...
}
```

View properties that have an `on()` method are detected when initializing the view object. Events 
can then be delegated using _&lt;property name&gt;:&lt;event name&gt;_ syntax.

View properties that have an `each()` method can trigger an `initialize` event. When the view is 
initialized, the members of the property are iterated and passed to the callback method.

```javascript

// model
var Song = Backbone.Model.extend( {
	defaults: { ... }
} );

// collection
var Album = Backbone.Collection.extend( {
	model: Song
} );

// item view
var ItemView = Backstab.View.extend( {
	<commit_msg>Made changes to README.md<commit_after>Backstab
==========

Backstab provides enhancements to Backbone.js.

Index
-------
    
- ``Backstab.View``. _&lt;content to come&gt;_
- ``Backstab.Dispatcher``. _&lt;content to come&gt;_
- ``Backstab.StateMachine``. _&lt;content to come&gt;_
- ``Backstab.Foo``. _&lt;content to come&gt;_
- ``Backstab`` (Core). _&lt;content to come&gt;_
- ``Backstab`` (Underscore.js Enhancements). _&lt;content to come&gt;_


Backstab.View
---------------

`Backstab.View` makes a number of enhancements to the standard `Backbone.View` `events` hash.

```javascript

// standard usage
events: {
	'someevent someselector': 'someMethod',
	'otherevent otherselector': 'otherMethod',
	// etc...
}
```

Multiple event/selector combos can be separated using a semi-colon (;) which can target the same 
method.

```javascript

// extended usage
events: {
	'someevent someselector; otherevent otherselector': 'sameMethod'
	// etc...
}
```

View properties that have an `on()` method are detected when initializing the view object. Events 
can then be delegated using _&lt;property name&gt;:&lt;event name&gt;_ syntax.

View properties that have an `each()` method can trigger an `initialize` event. When the view is 
initialized, the members of the property are iterated and passed to the callback method.

```javascript

// model
var Song = Backbone.Model.extend( {
	defaults: { ... }
} );

// collection
var Album = Backbone.Collection.extend( {
	model: Song
} );

// item view
var ItemView = Backstab.View.extend( {
	
{'fraction_non_alphanumeric': 0.15261437908496733, 'fraction_numerical': 0.0, 'mean_word_length': 4.009819967266775, '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': '2418890', 'n_tokens_mistral': 1012, 'n_tokens_neox': 947, 'n_words': 311}