diff options
| author | Max Isom <[email protected]> | 2020-03-18 22:29:43 -0500 |
|---|---|---|
| committer | Max Isom <[email protected]> | 2020-03-18 22:29:43 -0500 |
| commit | 7f39642c49b55dc1c29eb07962c79797eee66270 (patch) | |
| tree | 05ed46a3c9192158a3aa94522775e7415023e2dd /src/utils/get-progress-bar.ts | |
| parent | 035737312360279efd5026b225f30ef14aa55abf (diff) | |
| download | muse-7f39642c49b55dc1c29eb07962c79797eee66270.tar.xz muse-7f39642c49b55dc1c29eb07962c79797eee66270.zip | |
Add queue output, various bug fixes
Diffstat (limited to 'src/utils/get-progress-bar.ts')
| -rw-r--r-- | src/utils/get-progress-bar.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/utils/get-progress-bar.ts b/src/utils/get-progress-bar.ts new file mode 100644 index 0000000..7db3dd0 --- /dev/null +++ b/src/utils/get-progress-bar.ts @@ -0,0 +1,15 @@ +export default (width: number, progress: number): string => { + const dotPosition = Math.floor(width * progress); + + let res = ''; + + for (let i = 0; i < width; i++) { + if (i === dotPosition) { + res += '🔘'; + } else { + res += '▬'; + } + } + + return res; +}; |
