# linerstream

> Split a readable stream by newline characters

Latest version **0.2.0** (published 2017-03-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install linerstream
pnpm add linerstream
yarn add linerstream
bun add linerstream
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2017-03-12 |
| First published | 2014-01-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Noah Issaacson |
| Maintainers | nisaacson, apriendeau |
| Keywords | stream, line, split, newline |

## Links

- npm: https://www.npmjs.com/package/linerstream
- Repository: https://github.com/nisaacson/linerstream
- Issues: https://github.com/nisaacson/linerstream/issues
- npm.io page: https://npm.io/package/linerstream

## 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

- 0.2.0 (latest) — 2017-03-12
- 0.1.4 — 2014-08-11
- 0.1.3 — 2014-03-21
- 0.1.2 — 2014-03-20
- 0.1.1 — 2014-02-27
- 0.1.0 — 2014-01-09
- 0.0.6 — 2014-01-08
- 0.0.5 — 2014-01-07
- 0.0.4 — 2014-01-07
- 0.0.3 — 2014-01-07
- 0.0.2 — 2014-01-07
- 0.0.1 — 2014-01-07

## README

# linerstream

Split a readable stream by newline characters

[![NPM](https://nodei.co/npm/linerstream.png)](https://nodei.co/npm/linerstream/)

[![Build Status](https://travis-ci.org/nisaacson/linerstream.png)](https://travis-ci.org/nisaacson/linerstream)
[![Dependency Status](https://david-dm.org/nisaacson/linerstream/status.png)](https://david-dm.org/nisaacson/linerstream)
[![Code Climate](https://codeclimate.com/github/nisaacson/linerstream.png)](https://codeclimate.com/github/nisaacson/linerstream)

# Installation
```bash
npm install -S linerstream
```

# Usage

Create an instance of linestream and pipe a readable stream into that instance

```javascript
var Linerstream = require('linerstream')
// splitter is an instance of require('stream').Transform
var opts = {
  highWaterMark: 2
}
var splitter = new Linerstream(opts) // opts is optional

var readStream = fs.createReadStream('/file/with/line/breaks.txt')
var lineByLineStream = readStream.pipe(splitter)
lineByLineStream.on('data', function(chunk) {
  console.dir(chunk)  // no line breaks here :)
})
```


## Override EOL

If you don't want to use the OS default `EOL` character, you can ovverride it when creating the stream

```
var stream2 = new LinerStream({EOL: '\n'})
//force windows EOL
var stream3 = new LinerStream({EOL: '\r\n'})
```

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