pad-stdio

3.0.0 • Public • Published

pad-stdio

Pad stdout and stderr

Especially useful with CLI tools when you don't directly control the output.

Install

$ npm install pad-stdio

Usage

import {padStdout} from 'pad-stdio';

padStdout('  ');      // Start padding
console.log('foo');
padStdout('    ');
console.log('bar');
padStdout();          // End padding
console.log('baz');

/*
  foo
    bar
baz
*/

API

padStdout(padString)

Pads each line of process.stdout with the given pad string until the method is called again with no arguments.

padStderr(padString)

Pads each line of process.stderr with the given pad string until the method is called again with no arguments.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.0.0
    4
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 3.0.0
    4
  • 2.0.0
    79
  • 1.0.0
    5,916
  • 0.1.1
    5,228
  • 0.1.0
    0

Package Sidebar

Install

npm i pad-stdio

Weekly Downloads

11,227

Version

3.0.0

License

MIT

Unpacked Size

3.04 kB

Total Files

4

Last publish

Collaborators

  • sindresorhus