Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yetnt/cpb
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/yetnt/cpb
- Owner: YetNT
- License: isc
- Created: 2023-02-03T16:19:12.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-04T05:14:14.000Z (almost 2 years ago)
- Last Synced: 2023-07-19T17:40:06.179Z (over 1 year ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Custom Progress Bar
What this code should do is to give you an array which contains info on a bar.
# Installation
Coming Soon...
# Usage
```js
const cpb = //how it will be importedcpb.bar(10, 100)
```## Parameters
| Param | Type | Required |
|------------|------------|----------|
| Percentage |`int` (>100)| true |
| Max |`int` | true |
| Empty Char | any | false |
| Fill Char | any | false |#### Percentage
This is what percentage of the bar will be filled.
> `50` will fill half the bar
> `100` will fill the entire bar.#### Max
The amount of bar elements allowed to be generated.
> If `10` it will generate 50 bar elements, and paired with `10` for *percentage*, 5 bars will be marked filled and the 45 rest will be marked empty. (10% of 50 = 5)#### Empty Char
What empty bar elements elements will be represented by. If not set it will be the default `0`#### Fill Char
What filled bar elements elements will be represented by. If not set it will be the default `1`