# pad-stdio

> Pad stdout and stderr

Latest version **3.0.0** (published 2021-04-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install pad-stdio
pnpm add pad-stdio
yarn add pad-stdio
bun add pad-stdio
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2021-04-08 |
| First published | 2014-03-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=12 |
| Dependencies | 1 |
| Unpacked size | 3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | pad, indent, cli, format, string, stdio, stdout, stderr |

## Links

- npm: https://www.npmjs.com/package/pad-stdio
- Repository: https://github.com/sindresorhus/pad-stdio
- Homepage: https://github.com/sindresorhus/pad-stdio#readme
- Issues: https://github.com/sindresorhus/pad-stdio/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/pad-stdio

## Dependencies (1)

- [lpad](https://npm.io/package/lpad.md) ^3.0.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 3.0.0 (latest) — 2021-04-08
- 2.0.0 — 2015-06-15
- 1.0.0 — 2014-08-13
- 0.1.1 — 2014-03-07
- 0.1.0 — 2014-03-06

## README

# pad-stdio

> Pad stdout and stderr

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

![](https://f.cloud.github.com/assets/170270/2420088/0c74e148-ab6a-11e3-9c1e-3ea2b91d24f2.png)

## Install

```
$ npm install pad-stdio
```

## Usage

```js
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.

---
_Source: https://npm.io/package/pad-stdio · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
