<commit_before># Carina

## Installation

### Browser
```html
<script src="js/carina.js"></script>
```

### Node
```
npm i --save carina
```

## Usage
### Browser

#### index.html
```html
<doctype html>
<html>
    <head>
        <title>Carina</title>
    </head>
    <body>
        <script src="js/carina.js"></script>
        <script src="js/app.js"></script>
    </body>
</html>
```

#### app.js
```js
var ca = new carina.Carina();
ca.subscribe('channel:1:update', function (data) {
    console.log('Channel update', data);
});
```
### Node

#### JavaScript
```js
const Carina = require('carina').Carina;

let ca = new Carina();
ca.subscribe('channel:1:update', data => {
    console.log('Channel update', data);
});
```

#### TypeScript
```ts
import { Carina } from 'carina';

let ca = new Carina();
ca.subscribe('channel:1:update', data => {
    console.log('Channel update', data);
});
```<commit_msg>Add importing ws to the readme for node.<commit_after># Carina

## Installation

### Browser
```html
<script src="js/carina.js"></script>
```

### Node
```
npm i --save carina
```

## Usage
### Browser

#### index.html
```html
<doctype html>
<html>
    <head>
        <title>Carina</title>
    </head>
    <body>
        <script src="js/carina.js"></script>
        <script src="js/app.js"></script>
    </body>
</html>
```

#### app.js
```js
var ca = new carina.Carina();
ca.subscribe('channel:1:update', function (data) {
    console.log('Channel update', data);
});
```
### Node

#### JavaScript
```js
const Carina = require('carina').Carina;
const ws = require('ws');

Carina.WebSocket = ws;

let ca = new Carina();
ca.subscribe('channel:1:update', data => {
    console.log('Channel update', data);
});
```

#### TypeScript
```ts
import { Carina } from 'carina';
import * as ws from 'ws';

Carina.WebSocket = ws;

let ca = new Carina();
ca.subscribe('channel:1:update', data => {
    console.log('Channel update', data);
});
```
{'fraction_non_alphanumeric': 0.22846828261990718, 'fraction_numerical': 0.0030943785456420837, 'mean_word_length': 3.7901234567901234, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 37, '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': '2906743', 'n_tokens_mistral': 714, 'n_tokens_neox': 673, 'n_words': 161}