# stream-newline **Repository Path**: mirrors_limulus/stream-newline ## Basic Information - **Project Name**: stream-newline - **Description**: Ensure stream ends with a newline - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-09 - **Last Updated**: 2026-02-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## 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).