<commit_before># h5.step

Flow control for node.js and the browser.

## Installation

```
npm install h5.step
```

## Usage

Require the `h5.step` module:

```js
var step = require('h5.step');
```

Call the `step()` function with individual step functions as arguments:

```js
step(
  function step1()
  {
    console.log("Step 1");
  },
  function step2()
  {
    console.log("Step 2");
  },
  function step3()
  {
    console.log("Step 3");
  }
);
```

Each step is executed in a shared context (`this` variable). That context is an
object with a few predefined properties (actions) that are used to change
the control flow (see API). Only one type of action can be used per step, i.e.
one cannot call `done()` and then `next()` in the same step function.
For example, this is invalid (`done()` AND `next()` are called):

```js
stepN()
{
  this.done();
  this.next();
}
```

But this is allowed (`done()` OR `next()` is called):

```js
stepN(err)
{<commit_msg>Added missing `function` to the example code.<commit_after># h5.step

Flow control for node.js and the browser.

## Installation

```
npm install h5.step
```

## Usage

Require the `h5.step` module:

```js
var step = require('h5.step');
```

Call the `step()` function with individual step functions as arguments:

```js
step(
  function step1()
  {
    console.log("Step 1");
  },
  function step2()
  {
    console.log("Step 2");
  },
  function step3()
  {
    console.log("Step 3");
  }
);
```

Each step is executed in a shared context (`this` variable). That context is an
object with a few predefined properties (actions) that are used to change
the control flow (see API). Only one type of action can be used per step, i.e.
one cannot call `done()` and then `next()` in the same step function.
For example, this is invalid (`done()` AND `next()` are called):

```js
function stepN()
{
  this.done();
  this.next();
}
```

But this is allowed (`done()` OR `next()` is called):

```js
function stepN(err)
{
{'fraction_non_alphanumeric': 0.1534954407294833, 'fraction_numerical': 0.010131712259371834, 'mean_word_length': 3.72488038277512, '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': '4567566', 'n_tokens_mistral': 681, 'n_tokens_neox': 630, 'n_words': 260}