National Pest Management
Have opinions about JavaScript? We want to hear them. Take the 2018 JavaScript Ecosystem Survey »

stream-newline

1.0.0 • Public • Published

stream-newline Build Status

Ensure stream ends with a newline

Usage

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).

install

npm i stream-newline

Downloadsweekly downloads

7

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability