Constructor
new ProgressBar(options)
Initialize the ProgressBar
class with specific options to configure the
progress bar.
Parameters:
Name | Type | Description |
---|---|---|
options |
ProgressBarOptions | Options object for configuring the progress bar. |
Members
idxLoading :number
Index for the loading animation.
Type:
- number
loadings :'\'|'|'|'/'|'-'
Characters for the loading animation.
Type:
- '\' | '|' | '/' | '-'
options :ResolvedProgressBarOptions
Options object for configuring the progress bar.
Type:
- ResolvedProgressBarOptions
Methods
create(bytesDownloaded, totalBytes) → {string}
Creates a string formatted download progress bar with centered percentage.
Parameters:
Name | Type | Description |
---|---|---|
bytesDownloaded |
number | The number of bytes downloaded so far. |
totalBytes |
number | The total number of bytes to download. |
Returns:
The formatted progress bar string with percentage and byte information.
- Type
- string