# progress-notifier

> Small hierarchical progress notifier.

Latest version **0.2.2** (published 2015-09-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install progress-notifier
pnpm add progress-notifier
yarn add progress-notifier
bun add progress-notifier
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2015-09-05 |
| First published | 2015-09-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | klmdb |
| Maintainers | klmdb |

## Links

- npm: https://www.npmjs.com/package/progress-notifier
- Repository: https://github.com/klmdb/progress-notifier
- Issues: https://github.com/klmdb/progress-notifier/issues
- npm.io page: https://npm.io/package/progress-notifier

## Recent versions

- 0.2.2 (latest) — 2015-09-05
- 0.2.0 — 2015-09-05
- 0.1.0 — 2015-09-04

## README

# progress-notifier

Small hierarchical progress notifier.

## Installation

    npm install progress-notifier --save

## Usage


```javascript
var PN = require('progress-notifier');

var child1Progress = PN();
var child2Progress = PN();

var mainProgress   = PN();
mainProgress.addChild(child1Progress);
mainProgress.addChild(child2Progress);

child1Progress.setNumTicks(5);
child2Progress.setNumTicks(7);

var reportProgressFactory = function(notifierName){
  return function(p){

    console.log(notifierName + ' : ' + (Math.round(p*100)) + ' %' );
  };
};
child1Progress.onTick(reportProgressFactory('child1Progress'));
child2Progress.onTick(reportProgressFactory('child2Progress'));
mainProgress  .onTick(reportProgressFactory('mainProgress'));

child1Progress.tick();
child1Progress.tick();

child2Progress.tick();
child2Progress.tick();
child2Progress.tick();

mainProgress  .tick();

```

## API

    getProgress()
    getTicks()
    getNumTicks()

    setNumTicks(n)
    addNumTicks(n)

    tick()

    addChild   (ProgressNotifier)
    removeChild(ProgressNotifier)

    onTick (f)
    offTick(f)


## Tests

    npm test

## Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style.
Add unit tests for any new or changed functionality. Lint and test your code.

## Release History

* 0.1.0 Initial release

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