<commit_before># yaspm

```sh
npm install --save yaspm
```

Heavily inspired by [serialport-manager](https://github.com/tmpvar/serialport-manager), does a little part of it being portable to node-webkit.

## Usage

### Machines(sigTerm)
```
/**
 * Describes the conjunction of machines to
 * search for.
 */
```

#### search(onValidDeviceFound)
```
/**
 * Searches for valid devices that are connected
 * @param  {Function} onValidDeviceFound
 * callback function to be resolved with
 * (err|Device) when a valid device is found
 */
```

#### isValidDevice(device)

```
/**
 * Verifies if the device passed to it is valid
 * (given a signature).
 * @param  {obj}  device info about the device
 * @return {Boolean}        true|false
 */
```

### Device()
/**
 * Represents a valid Device.
 * @param {obj} device the info about the device
 * @param {obj} sp     serialport object
 */

#### connect(ocb, ccb)
```
/**
 * Tries to connect to the device.
 * @param  {Function} ocb callback function for
 *                        the open event
 * @param  {Function} ccb callback function for
 *                        the close event
 */
```

#### registerToData(cb)
```
/**
 * Sets a listener for the 'data' event of the
 * device.<commit_msg>updates readme<commit_after># yaspm

```sh
npm install --save yaspm
```

Heavily inspired by [serialport-manager](https://github.com/tmpvar/serialport-manager), does a little part of it being portable to node-webkit.

## Usage

### Machines(sigTerm)
```
/**
 * Describes the conjunction of machines to
 * search for.
 */
```

#### search(onValidDeviceFound)
```
/**
 * Searches for valid devices that are connected
 * @param  {Function} onValidDeviceFound
 * callback function to be resolved with
 * (err|Device) when a valid device is found
 */
```

#### isValidDevice(device)

```
/**
 * Verifies if the device passed to it is valid
 * (given a signature).
 * @param  {obj}  device info about the device
 * @return {Boolean}        true|false
 */
```

### Device()
```
/**
 * Represents a valid Device.
 * @param {obj} device the info about the device
 * @param {obj} sp     serialport object
 */
```

#### connect(ocb, ccb)
```
/**
 * Tries to connect to the device.
 * @param  {Function} ocb callback function for
 *                        the open event
 * @param  {Function} ccb callback function for
 *                        the close event
 */
```

#### registerToData(cb)
```
/**
 * Sets a listener for the 'data' event of the
 * device.
{'fraction_non_alphanumeric': 0.14164989939637826, 'fraction_numerical': 0.0, 'mean_word_length': 3.0620915032679736, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6729165', 'n_tokens_mistral': 775, 'n_tokens_neox': 734, 'n_words': 266}