<commit_before>    //Use case: define a flow w/ one or more steps

    $.Flow('flowOne')
        .step('one', function() {

        })
        .step('two', function() {

        });

    //Use case: result from previous step passed to next step
    $.Flow('flowOne')
        .step('one', function() {

            return "someResult";

        })
        .step('two', function(arg1) {

            //arg1 === "someResult" //should evaluate true!

        });
    //Use case: on failure matching response jump to another flow
    $.Flow('flowOne')
        .step('one', function() {

        })
        .step('two', function() {

        }).on.failure('someErrorCode').jumpTo('flowTwo');

    //Use case: on failure w/ ANY response jump to another flow
    $.Flow('flowOne')
        .step('one', function() {

        })
        .step('two', function() {

        }).on.failure().jumpTo('flowTwo');
    //Use case: on failure matching response jump to another flow, specific step
    $.Flow('flowOne')
        .step('one', function() {

        })
        .step('two', function() {

        }).on.failure('someErrorCode').jumpTo('flowTwo', 'two');
    //Use case: on failure w/ ANY response jump to another flow, specific step
    $.Flow('flowOne')
        .step('one', function() {

        })
        .step('two', function() {

        }).on.failure().jumpTo('flowTwo', 'two');
    //Use case: begin a flow
    $.Flow('flowOne').begin();
    //Use case: begin a flow while skipping one or more steps
    $.Flow('flowOne').skip('one').begin();
    //Use case: begin a flow at a certain step
    $.Flow('flowOne').begin('two');
    //Use case: fetch a step:
    $.Flow('flowOne').step('one'); //returns the step callback<commit_msg>Updated some code samples/use cases<commit_after># jquery.flow - better name hopefully forthcoming

##Intro

jquery.flow is a flow control library aimed at encouraging developers to write organized, testable code.

##Examples/Use Cases

###Use case: define a flow w/ one or more steps

```
    $.Flow('flowOne')
        .step('one', function() {

        })
        .step('two', function() {

        });
```

###Use case: result from previous step passed to next step

```
    $.Flow('flowOne')
        .step('one', function() {

            return "someResult";

        })
        .step('two', function(arg1) {

            //arg1 === "someResult" //should evaluate true!

        });
```

###Use case: on failure matching response jump to another flow

```
    $.Flow('flowOne')
        .step('one', function() {

        })
        .step('two', function() {

        }).onFailure('someErrorCode').jumpTo('flowTwo');
```

###Use case: on failure w/ ANY response jump to another flow

```
    $.Flow('flowOne')
        .step('one', function() {

        })
        .step('two', function() {

        }).onFailure().jumpTo('flowTwo');
```

###Use case: on failure matching response jump to another flow, specific step

```
    $.Flow('flowOne')
        .step('one', function() {

        })
        .step('two', function() {

        }).onFailure('someErrorCode').jumpTo('flowTwo', 'two');
```

###TBD - Use case: on failure w/ ANY response jump to another flow, specific step

```
    $.Flow('flowOne')
        .step('one', function() {

        })
        .step('two', function() {

        }).onFailure().jumpTo('flowTwo', 'two');
```

###Use case: begin a previously defined flow

```
    $.Flow('flowOne').begin();
```

###Use case: begin a flow while skipping one or more steps
```
    $.Flow('flowOne')
        .skip('one')
        .skip('two')
        .begin();
```

###Use case: begin a flow at a certain step
```
    $.Flow('flowOne')
        .startOn('two')
        .begin();
```

###Use case: fetch a previously defined step (for testing purposes):
```
    $.Flow('flowOne').step('one'); //returns the step
```
{'fraction_non_alphanumeric': 0.18448365334717176, 'fraction_numerical': 0.0010378827192527244, 'mean_word_length': 2.3204134366925064, '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': '3760835', 'n_tokens_mistral': 1157, 'n_tokens_neox': 1095, 'n_words': 334}