# stream-splitter-transform

> A stream.Transform-based stream splitter

Latest version **0.0.4** (published 2013-12-03) · 0 weekly downloads

## Install

```sh
npm install stream-splitter-transform
pnpm add stream-splitter-transform
yarn add stream-splitter-transform
bun add stream-splitter-transform
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2013-12-03 |
| First published | 2013-07-02 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.9.4 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Shea Levy |
| Maintainers | shlevy |

## Links

- npm: https://www.npmjs.com/package/stream-splitter-transform
- Repository: https://bitbucket.org/shlevy/stream-splitter
- npm.io page: https://npm.io/package/stream-splitter-transform

## Dependencies (1)

- [buffertools](https://npm.io/package/buffertools.md) >=1.1.1 <2.0.0

## Recent versions

- 0.0.4 (latest) — 2013-12-03
- 0.0.3 — 2013-07-03
- 0.0.2 — 2013-07-02
- 0.0.1 — 2013-07-02
- 0.0.0 — 2013-07-02

## README

stream-splitter-transform
=========================
A Transform objectMode stream to break a stream along a separator

new StreamSplitter([separator, [options]])
------------------------------------------
A new `stream.Transform` that splits the input stream along `separator` and emits each split chunk in objectMode.

`separator` defaults to `\n`

`options` is passed along to the Transform constructor. `decodeStrings` and `objectMode` are always set to `false` and `true`, respectively

Example: Print a script out line-by-line
----------------------------------------

    var StreamSplitter = require('stream-splitter-transform');
    var fs = require('fs');

    var splitter = new StreamSplitter();
    function readSplitter() {
        var line = splitter.read();
        if (line !== null) {
            console.log("Got line: " + line);
            line = splitter.read();
        }
    }
    splitter.on('readable', readSplitter);

    var thisScript = fs.createReadStream(process.argv[1]);
    thisScript.pipe(splitter);

    readSplitter();

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