# progbar

> terminal progress bar

Latest version **1.2.1** (published 2018-08-29) · 0 weekly downloads

## Install

```sh
npm install progbar
pnpm add progbar
yarn add progbar
bun add progbar
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2018-08-29 |
| First published | 2013-05-11 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 15.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Joshua M. Clulow |
| Maintainers | arekinath, bahamas10, dap, jclulow, melloc, trentm |
| Keywords | progress, bar, terminal, console, cli |

## Links

- npm: https://www.npmjs.com/package/progbar
- Repository: https://github.com/joyent/node-progbar
- Homepage: https://github.com/joyent/node-progbar#readme
- Issues: https://github.com/joyent/node-progbar/issues
- npm.io page: https://npm.io/package/progbar

## Dependencies (3)

- [extsprintf](https://npm.io/package/extsprintf.md) ^1.4.0
- [assert-plus](https://npm.io/package/assert-plus.md) ^1.0.0
- [readable-stream](https://npm.io/package/readable-stream.md) ~1.0.27-1

## 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

- 1.2.1 (latest) — 2018-08-29
- 1.2.0 — 2017-04-12
- 1.1.1 — 2016-09-21
- 1.1.0 — 2015-01-10
- 1.0.0 — 2014-08-15
- 0.1.0 — 2013-12-19
- 0.0.3 — 2013-12-19
- 0.0.2 — 2013-05-30
- 0.0.1 — 2013-05-11

## README

# node-progbar

`node-progbar` is a library for drawing progress bars in `xterm`-like (or
hopefully any somewhat *ECMA-48*-compatible) terminals.

## Usage

```javascript
var mod_progbar = require('progbar');

/*
 * Instantiate the ProgressBar class, like so.  This instance
 * represents a single transfer operation, and will draw one
 * final status report when the transfer is deemed over.
 *
 * NB: you may also set 'nosize' to true, instead of passing
 *     'size', if you do not know the length of the stream
 *     in advance.
 */
var bar = new mod_progbar.ProgressBar({
	filename: 'whatever.zip', // filename to display
	size: 10048               // filesize in bytes
});

/*
 * Usually, you would use the progress bar in Stream data
 * events, like so:
 */
stream.on('data', function (data) {
	bar.advance(data.length);
});
stream.on('end', function (data) {
	bar.end();
});

/*
 * You may also use the stream() method to get a passthrough stream
 * that you may pipe your data through.  The bar will advance with
 * the passage of bytes through the stream, and end() will be called
 * at the end of the stream.
 */
input_stream.pipe(bar.stream()).pipe(output_stream);
```

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