Skip to content

Commit

Permalink
Merge pull request #1 from spookyuser/main2
Browse files Browse the repository at this point in the history
Update readme
  • Loading branch information
spookyuser authored Dec 27, 2023
2 parents 169b8c3 + 539e518 commit 1510d3c
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 11 deletions.
48 changes: 38 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,49 @@
# typescript-node-module-boilerplate
# web-console-progress-bar

[![NPM Version](https://img.shields.io/npm/v/typescript-node-module-boilerplate.svg)](https://www.npmjs.com/package/typescript-node-module-boilerplate)
[![node](https://img.shields.io/node/v/typescript-node-module-boilerplate.svg)](https://www.npmjs.com/package/typescript-node-module-boilerplate)
[![NPM Version](https://img.shields.io/npm/v/web-console-progress-bar.svg)](https://www.npmjs.com/package/web-console-progress-bar)

>
> A progress bar for the browser console.
## Install

```bash
npm install typescript-node-module-boilerplate
```sh
npm install web-console-progress-bar
```

## Usage

```ts
import {myFunction} from 'typescript-node-module-boilerplate';
```js
import { ConsoleProgressBar } from "web-console-progress-bar";

myFunction('unicorns');
//=> 'unicorns & rainbows'
const progressBar = new ConsoleProgressBar(100);
progressBar.update(10);
//=> Progress: [██████░░░░░░░░░░░░] 10% ETA: XX.XXs
```

## API

### ConsoleProgressBar(total, updateInterval?)

Creates a new progress bar instance.

#### total

Type: `number`

The total number of units to be processed.

#### updateInterval

Type: `number`Default: `2000`

The interval in milliseconds at which the progress bar should be updated.

### update(currentValue)

Updates the progress bar with the current value.

#### currentValue

Type: `number`

The current value of the progress.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web-console-progress-bar",
"version": "1.0.0",
"version": "0.0.0",
"description": "A progress bar for the browser console.",
"keywords": [
"progress",
Expand Down

0 comments on commit 1510d3c

Please sign in to comment.