<commit_before># reconnect

reconnect to a network stream, (currently supports [tcp](http://nodejs.org/api/net.html), 
and [shoe](https://github.com/substack/shoe) on the client-side.

## Example

pass function will be called every time the stream connects.
if the connection is broken, reconnect will make a new connection
and call this function again.
``` js
var reconnect = require('reconnect')

reconnect(function (stream) {
  //called every time the connection is remade.
  //only one connection will ever be live at one time.
}).connect(port)

## API

### reconnect (opts, onConnect)

if `opts` is an object it will be passed to [backoff](https://github.com/MathieuTurcotte/node-backoff)
which handles throtteling the reconnection attempts. it also accepts a `type` parameter, which may 
be either `'fibonacci'` or `'exponential'`.
<commit_msg>Fixed formatting<commit_after># reconnect

reconnect to a network stream, (currently supports [tcp](http://nodejs.org/api/net.html), 
and [shoe](https://github.com/substack/shoe) on the client-side.

## Example

pass function will be called every time the stream connects.
if the connection is broken, reconnect will make a new connection
and call this function again.
``` js
var reconnect = require('reconnect')

reconnect(function (stream) {
  //called every time the connection is remade.
  //only one connection will ever be live at one time.
}).connect(port)
```

## API

### reconnect (opts, onConnect)

if `opts` is an object it will be passed to [backoff](https://github.com/MathieuTurcotte/node-backoff)
which handles throtteling the reconnection attempts. it also accepts a `type` parameter, which may 
be either `'fibonacci'` or `'exponential'`.

{'fraction_non_alphanumeric': 0.10954891622729936, 'fraction_numerical': 0.0, 'mean_word_length': 4.674418604651163, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '2904951', 'n_tokens_mistral': 510, 'n_tokens_neox': 495, 'n_words': 201}