# streamify-string

> Accepts a string and returns a readable stream that outputs the string.

Latest version **1.0.1** (published 2016-08-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install streamify-string
pnpm add streamify-string
yarn add streamify-string
bun add streamify-string
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-08-16 |
| First published | 2016-08-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/streamify-string) |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Chris Allen Lane |
| Maintainers | chrisallenlane |
| Keywords | stream, string |

## Links

- npm: https://www.npmjs.com/package/streamify-string
- Repository: https://github.com/chrisallenlane/streamify-string
- Homepage: https://github.com/chrisallenlane/streamify-string#readme
- Issues: git://github.com/chrisallenlane/streamify-string/issues
- npm.io page: https://npm.io/package/streamify-string

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2016-08-16
- 1.0.0 — 2016-08-16

## README

[![Build Status](https://travis-ci.org/chrisallenlane/streamify-string.svg)](https://travis-ci.org/chrisallenlane/streamify-string)
[![npm](https://img.shields.io/npm/v/streamify-string.svg)]()
[![npm](https://img.shields.io/npm/dt/streamify-string.svg)]()

streamify-string
================
`streamify-string` accepts a `string` and returns a [Readable stream][] that
outputs the string. It's useful for stubbing Readable streams when writing
unit-tests for [Writeable][], [Duplex][], and [Transform][] streams.

```javascript
const Streamify        = require('streamify-string');
const myWritableStream = require('../path/to/file.js');

// initialize a string
var str = 'Grumpy wizards make toxic brew for the evil Queen and Jack.'

// "Streamify" that string and pipe it to a writeable stream
Streamify(str).pipe(myWriteableStream);
```

### Parameters ###
```javascript
const streamified = Streamify(str, [options]);
```
- `str`: the `string` that the stream should output.
- `options`: Optional options to pass to the stream constructor. ([Documentation][options])

### Events ###
The stream will emit the following events:

- [`readable`][event-readable]
- [`data`][event-data]
- [`end`][event-end]
- [`close`][event-close]


[Duplex]: https://nodejs.org/api/stream.html#stream_class_stream_duplex
[Readable stream]: https://nodejs.org/api/stream.html#stream_class_stream_readable
[Transform]: https://nodejs.org/api/stream.html#stream_class_stream_transform
[Writeable]: https://nodejs.org/api/stream.html#stream_class_stream_writable

[event-close]: https://nodejs.org/api/stream.html#stream_event_close_1
[event-data]: https://nodejs.org/api/stream.html#stream_event_data
[event-end]: https://nodejs.org/api/stream.html#stream_event_end
[event-readable]: https://nodejs.org/api/stream.html#stream_event_readable
[options]: https://nodejs.org/api/stream.html#stream_new_stream_readable_options

---
_Source: https://npm.io/package/streamify-string · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
