Spaces:
Paused
Paused
Download node_modules/cli-progress/lib/format-bar.js from Mooizz/New-space-openenv: direct link, hf CLI and curl.
- Browser
- Download file 442 Bytes
-
https://huggingface.co/spaces/Mooizz/New-space-openenv/resolve/main/node_modules/cli-progress/lib/format-bar.js
- Command line
-
hf download hf://spaces/Mooizz/New-space-openenv/node_modules/cli-progress/lib/format-bar.js
-
curl -L -o format-bar.js https://huggingface.co/spaces/Mooizz/New-space-openenv/resolve/main/node_modules/cli-progress/lib/format-bar.js
442 Bytes
| // format bar | |
| module.exports = function formatBar(progress, options){ | |
| // calculate barsize | |
| const completeSize = Math.round(progress*options.barsize); | |
| const incompleteSize = options.barsize-completeSize; | |
| // generate bar string by stripping the pre-rendered strings | |
| return options.barCompleteString.substr(0, completeSize) + | |
| options.barGlue + | |
| options.barIncompleteString.substr(0, incompleteSize); | |
| } |