Package Exports
- @vimlet/commons-progress
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@vimlet/commons-progress) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Progress
Feedback of running progress to the user.
Installation
npm install @vimlet/progress
It will be also installed as a module within @vimlet/commons
Usage
progress.paintProgress(value, outputHandler)
Prints progress at a given percent.
- value: Progress percent.
- outputHandler: Default output callback
function(out), >redirects stdout when provided.
progress.showProgress(value, options, outputHandler)
Prints progress percent by value and total and returns the percent.
- value: Current progress value.
- options:
- paintProgress: Function that actually does the painting.
- total: Total progress value.
- outputHandler: Default output callback
function(out), redirects stdout when provided.
progress.progressHandler(total, max, options, mainOutputHandler)
Handle progress painting avoiding duplicated output of the same progress.
- total: Total percent value.
- max:Provide a virtual limit that avoids printing over this value.
- options:
- paintProgress: Function that actually does the painting.
- mainOutputHandler: Default output callback
function(out), redirects stdout when provided.
License
This project is under MIT License. See LICENSE for details.