@cjser/pad-stream
v4.0.0-cjser.2
Published
Pad each line in a stream
Downloads
78
Maintainers
Readme
pad-stream
Pad each line in a stream
Install
npm install pad-streamUsage
// pad.js
import padStream from 'pad-stream';
process.stdin.pipe(padStream(2, '>')).pipe(process.stdout);$ echo 'foo\nbar' | node pad.js
>>foo
>>barAPI
padStream(count, indent?)
Returns a transform stream.
count
Type: number (integer)
The number of times to repeat indent.
indent
Type: string
Default: ' '
The string to use as indent.
Related
- indent-string - Indent each line in a string
- indent-string-cli - Indent each line in some text or stdin
cjser
This package is a CommonJS-compatible build generated by cjser for projects that still need require() support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.
Original repository: https://github.com/sindresorhus/pad-stream
