feature: vor und nachteile

This commit is contained in:
Hikyu
2026-05-31 13:54:31 +02:00
parent 552a947a1c
commit e3dad17446
23270 changed files with 3024794 additions and 200 deletions
+11
View File
@@ -0,0 +1,11 @@
// 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);
}