lib/misc.js
function visualPad(str, num) {
  var needed = num - str.replace(remove_colors_re, '').length;

  return needed > 0 ? str + ' '.repeat(needed) : str;
}
function visualPad(str, num) {
  var needed = num - str.replace(remove_colors_re, '').length;

  return needed > 0 ? str + ' '.repeat(needed) : str;
}
function visualPad ( str , num ) { var needed = num - str . replace ( remove_colors_re , '' ) . length ; return needed > 0 ? str + ' ' . repeat ( needed ) : str ; }
Visually padEnd. Adding colors to strings adds escape sequences that
make it a color but also adds characters to str.length that aren't
displayed.

@param  {string} str
@param  {number} num
@return {string}
Visually padEnd . Adding colors to strings adds escape sequences that make it a color but also adds characters to str . length that aren t displayed .