<commit_before>## BaresoilClient JS

This is the reference Javascript Baresoil client library for node and the browser. It establishes a secure, two-way connection to a Baresoil server and has two main uses: to allow you to execute server-side handler functions, and to listen for server-sent events. Due to this simple feature set, the client is self-contained in a single file.

Include this library in your frontend project to access the Baresoil Development Environment locally, and Baresoil Cloud over the Internet.

### Installation

  * npm: `npm install baresoil-client`
  * bower: `bower install baresoil-client`

If your system supports compiling binary modules, you can install the optional `bufferutil` package for better performance.

### Requirements

  * In the browser
    * native WebSocket support (i.e., IE 10+, Android Kitkat 4.4+, Firefox 11+, Chrome 16+, Safari 7+, Cordova). In mid-2016, this includes [91% of clients](http://caniuse.com/#feat=websockets) in the wild.

  * In node.js
    * `ws`: WebSocket library, listed in `package.json`.


### Quickstart

    var client = new BaresoilClient();
    client.on('error', console.error);
    client.on('connect_status', console.log);<commit_msg>README update.<commit_after>## BaresoilClient JS

This is the reference Javascript Baresoil client library for node and the browser. It establishes a secure, two-way connection to a Baresoil server and has two main uses: to allow you to execute server-side handler functions, and to listen for server-sent events. Due to this simple feature set, the client is self-contained in a single file.


### Installation

Include `BaresoilClient.min.js` in your frontend project, or install from `npm`.

  * npm: `npm install baresoil-client`

In `node.js`, if your system supports compiling C++ modules, you can install the optional `bufferutil` package for better performance.

### Requirements

  * In the browser
    * native WebSocket support (i.e., IE 10+, Android Kitkat 4.4+, Firefox 11+, Chrome 16+, Safari 7+, Cordova). In mid-2016, this includes [91% of clients](http://caniuse.com/#feat=websockets) in the wild.

  * In node.js
    * `ws`: WebSocket library, listed in `package.json`.
    * Optionally: `bufferutil` and `utf-8-validate` for better performance.

### Quickstart

    var client = new BaresoilClient();
    client.on('error', console.error);
    client.on('connection_status', console.log);
{'fraction_non_alphanumeric': 0.09443298969072166, 'fraction_numerical': 0.012783505154639175, 'mean_word_length': 4.262472885032538, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '433875', 'n_tokens_mistral': 737, 'n_tokens_neox': 651, 'n_words': 299}