<commit_before>thenstream
==========

Construct a [Readable stream](http://nodejs.org/api/stream.html#stream_class_stream_readable)
from a [thenable](http://promises-aplus.github.io/promises-spec/#terminology).
Useful if you don't have the actual stream yet.

## Installation

```js
npm install thenstream
```

## Usage

With [Legendary](https://github.com/novemberborn/legendary) installed:

```js
var Thenstream = require('thenstream');
var Promise = require('legendary').Promise;<commit_msg>add deprecation notice<commit_after>thenstream
==========

Construct a [Readable stream](http://nodejs.org/api/stream.html#stream_class_stream_readable)
from a [thenable](http://promises-aplus.github.io/promises-spec/#terminology).
Useful if you don't have the actual stream yet.

## Deprecation Notice

This module is no longer maintained. You can achieve a similar effect
like this:

```js
'use strict'

const PassThrough = require('stream').PassThrough

function streamify (thenable, opts) {
  const stream = new PassThrough(opts)

  Promise.resolve(thenable)
    .then(input => input.pipe(stream))
    .catch(err => stream.emit('error', err))

  return stream
}
```

This won't fully replace this module but it should suffice for most use cases.

## Installation

```js
npm install thenstream
```

## Usage

With [Legendary](https://github.com/novemberborn/legendary) installed:

```js
var Thenstream = require('thenstream');
var Promise = require('legendary').Promise;
{'fraction_non_alphanumeric': 0.141785957736878, 'fraction_numerical': 0.0, 'mean_word_length': 5.524444444444445, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '7091031', 'n_tokens_mistral': 469, 'n_tokens_neox': 435, 'n_words': 119}