Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

prefix-stream

nfriedly411MIT1.0.1

prefixes a (text) stream with a given string before each chunk, useful, for e.g., when piping text from multiple sources to stdout

prefix, stream, prepend

readme

prefix-stream NPM version Build Status Dependency Status

prefixes a (text) stream with a given string before each chunk, useful, for e.g., when piping text from multiple sources to stdout

Install

$ npm install --save prefix-stream

Usage

var prefix = require('prefix-stream');

var source = ... // or anything stream that outputs text

source.pipe(prefix('my cool prefix: ')).pipe(process.stdout);

Alternatively, you can use new PrefixStream({prefix: 'my cool prefix: '}) if you need to pass other options to the underlying stream implementation.

License

MIT © Nathan Friedly