<commit_before># now-and-later

Series/parallel execution of async functions with extension points

## Usage

```js
var nal = require('now-and-later');

function fn1(done){
  done(null, 1);
}

function fn2(done){
  done(null, 2);
}

function before(fn, key){
  console.log('called before: ', fn.name, key);
}

function after(fn, key){
  console.log('called after: ', fn.name, key);
}

function error(fn, key){
  console.log('called after error in: ', fn.name, key);
}

/*
  Calling series with an object can't guarantee order
  It uses Object.keys to get an order
  It is better to use an array if order must be guaranteed
 */
nal.series([fn1, fn2], {
  before: before,
  after: after,
  error: error
});

nal.parallel({
  fn1: fn1,
  fn2: fn2
}, {
  before: before,
  after: after,
  error: error
});
```
<commit_msg>Docs: Update usage for callback argument<commit_after># now-and-later

Series/parallel execution of async functions with extension points

## Usage

```js
var nal = require('now-and-later');

function fn1(done){
  done(null, 1);
}

function fn2(done){
  done(null, 2);
}

function before(fn, key){
  console.log('called before: ', fn.name, key);
}

function after(fn, key){
  console.log('called after: ', fn.name, key);
}

function error(fn, key){
  console.log('called after error in: ', fn.name, key);
}

/*
  Calling series with an object can't guarantee order
  It uses Object.keys to get an order
  It is better to use an array if order must be guaranteed
 */
nal.series([fn1, fn2], {
  before: before,
  after: after,
  error: error
}, console.log);

nal.parallel({
  fn1: fn1,
  fn2: fn2
}, {
  before: before,
  after: after,
  error: error
}, console.log);
```

{'fraction_non_alphanumeric': 0.14742451154529307, 'fraction_numerical': 0.011841326228537596, 'mean_word_length': 3.8563218390804597, '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': '4341761', 'n_tokens_mistral': 602, 'n_tokens_neox': 585, 'n_words': 191}