Spaces:
Paused
Paused
Download node_modules/cli-progress/lib/format-value.js from Mooizz/New-space-openenv: direct link, hf CLI and curl.
- Browser
- Download file 480 Bytes
-
https://huggingface.co/spaces/Mooizz/New-space-openenv/resolve/main/node_modules/cli-progress/lib/format-value.js
- Command line
-
hf download hf://spaces/Mooizz/New-space-openenv/node_modules/cli-progress/lib/format-value.js
-
curl -L -o format-value.js https://huggingface.co/spaces/Mooizz/New-space-openenv/resolve/main/node_modules/cli-progress/lib/format-value.js
480 Bytes
| // default value format (apply autopadding) | |
| // format valueset | |
| module.exports = function formatValue(v, options, type){ | |
| // no autopadding ? passthrough | |
| if (options.autopadding !== true){ | |
| return v; | |
| } | |
| // padding | |
| function autopadding(value, length){ | |
| return (options.autopaddingChar + value).slice(-length); | |
| } | |
| switch (type){ | |
| case 'percentage': | |
| return autopadding(v, 3); | |
| default: | |
| return v; | |
| } | |
| } |