progress-bar.js
function repeat (string, width) {
  var result = ''
  var n = width
  do {
    if (n % 2) {
      result += string
    }
    n = Math.floor(n / 2)
    /* eslint no-self-assign: 0 */
    string += string
  } while (n && stringWidth(result) < width)

  return wideTruncate(result, width)
}
function repeat (string, width) {
  var result = ''
  var n = width
  do {
    if (n % 2) {
      result += string
    }
    n = Math.floor(n / 2)
    /* eslint no-self-assign: 0 */
    string += string
  } while (n && stringWidth(result) < width)

  return wideTruncate(result, width)
}
function repeat ( string , width ) { var result = '' var n = width do { if ( n % 2 ) { result += string } n = Math . floor ( n / 2 ) /* eslint no-self-assign: 0 */ string += string } while ( n && stringWidth ( result ) < width ) return wideTruncate ( result , width ) }
lodash's way of repeating
lodash s way of repeating