Next Phenomenal Microbrewery
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    pad-stdiopublic

    pad-stdio Build Status

    Pad stdout and stderr

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

    Install

    $ npm install --save pad-stdio
    

    Usage

    var padStdio = require('pad-stdio');
     
    padStdio.stdout('  ');      // start padding
    console.log('foo');
    padStdio.stdout('    ');
    console.log('bar');
    padStdio.stdout();          // end padding
    console.log('baz');
     
    /*
      foo
        bar
    baz
    */

    API

    padStdio.stdout(pad)

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

    padStdio.stderr(pad)

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

    License

    MIT © Sindre Sorhus

    install

    npm i pad-stdio

    Downloadsweekly downloads

    21,399

    version

    2.0.0

    license

    MIT

    repository

    githubgithub

    last publish

    collaborators

    • avatar