pad-stream

4.0.0 • Public • Published

pad-stream

Pad each line in a stream

Install

npm install pad-stream

Usage

// pad.js
import padStream from 'pad-stream';

process.stdin.pipe(padStream(2, '>')).pipe(process.stdout);
$ echo 'foo\nbar' | node pad.js
>>foo
>>bar

API

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 4.0.0
    34
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 4.0.0
    34
  • 3.0.0
    11
  • 2.0.0
    32,947
  • 1.2.0
    55,944
  • 1.1.0
    2
  • 1.0.0
    1

Package Sidebar

Install

npm i pad-stream

Weekly Downloads

49,432

Version

4.0.0

License

MIT

Unpacked Size

3.21 kB

Total Files

4

Last publish

Collaborators

  • sindresorhus