<commit_before># Stream-String [![build status](https://secure.travis-ci.org/jamescostian/stream-string.png)](http://travis-ci.org/jamescostian/stream-string)

[![NPM](https://nodei.co/npm/stream-string.png)](https://nodei.co/npm/stream-string.png?compact=true)

Converts a stream to a string and supports promises.

# Installation

Assuming you have [Node](http://nodejs.org) and [NPM](https://npmjs.org) (which is bundled with Node), you can just run:

```
npm install --save stream-string
```

# Example

## Callbacks

```js<commit_msg>README: move badges, add coverage badge<commit_after># Stream-String

[![Build Status](https://img.shields.io/travis/jamescostian/stream-string.svg?style=flat)](https://travis-ci.org/jamescostian/stream-string)
[![Coverage Status](https://img.shields.io/coveralls/jamescostian/stream-string.svg?style=flat)](https://coveralls.io/r/jamescostian/stream-string?branch=master)

Converts a stream to a string and supports promises.


# Installation

Assuming you have [Node](http://nodejs.org) and [NPM](https://npmjs.org) (which is bundled with Node), you can just run:

```
npm install --save stream-string
```

# Example

## Callbacks

```js
{'fraction_non_alphanumeric': 0.1697792869269949, 'fraction_numerical': 0.0, 'mean_word_length': 5.205263157894737, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 9, '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': '3882325', 'n_tokens_mistral': 420, 'n_tokens_neox': 395, 'n_words': 79}