Pad each line in a stream
npm install pad-stream
// pad.js
import padStream from 'pad-stream';
process.stdin.pipe(padStream(2, '>')).pipe(process.stdout);
$ echo 'foo\nbar' | node pad.js
>>foo
>>bar
Returns a transform stream.
Type: number
(integer)
The number of times to repeat indent
.
Type: string
Default: ' '
The string to use as indent.
Author: Sindresorhus
Source Code: https://github.com/sindresorhus/pad-stream
License: MIT license