UNPKG

@mondaycom/apps-cli

Version:

A cli tool to manage apps (and monday-code projects) in monday.com

11 lines (10 loc) 553 B
const repeatChar = (char, times) => Array.from({ length: Math.round(times) }) .map(() => char) .join(''); export const createProgressBarString = (max, current, timeInSeconds) => { const progress = Math.round((current / max) * 100); const totalChars = 50; const normalizedProgress = Math.round(progress / 2); const progressBar = repeatChar('█', normalizedProgress) + repeatChar('░', totalChars - normalizedProgress); return `${progressBar} ${progress}%${timeInSeconds ? `, ${Math.round(timeInSeconds)} Seconds` : ''}`; };