🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

pad-stdio

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pad-stdio

Pad stdout and stderr

3.0.0
latest
Source
npm
Version published
Weekly downloads
13K
68.38%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

pad

FAQs

Package last updated on 08 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts