# stream-newline

> Ensure stream ends with a newline

Latest version **1.0.0** (published 2015-02-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install stream-newline
pnpm add stream-newline
yarn add stream-newline
bun add stream-newline
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-02-18 |
| First published | 2015-02-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Eric McCarthy |
| Maintainers | limulus |
| Keywords | stream, newline, append, trailing |

## Links

- npm: https://www.npmjs.com/package/stream-newline
- Repository: https://github.com/desertnet/stream-newline
- Issues: https://github.com/desertnet/stream-newline/issues
- npm.io page: https://npm.io/package/stream-newline

## Dependencies (1)

- [buffer-equal](https://npm.io/package/buffer-equal.md) 0.0.1

## 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.0 (latest) — 2015-02-18

## README

# stream-newline [![Build Status](https://travis-ci.org/desertnet/stream-newline.svg?branch=master)](https://travis-ci.org/desertnet/stream-newline)

Ensure stream ends with a newline

## Usage

```javascript
var streamNewline = require("stream-newline")

// A stream that may or may not have a newline at the end
var fileStream = fs.createReadStream("README.txt")

// Pipe fileStream to stdout and guarantee a newline at the end
fileStream.pipe(streamNewline()).pipe(process.stdout)
```

## API

### streamNewline([opts])

Creates a new stream that ensures there will be a newline at the end. The optional `opts` argument is an options object that can contain the following properties:

  * `eol`: A custom end-of-line sequence. Defaults to `os.EOL` (will be `\n` on POSIX, `\r\n` on Windows).

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