utils.js
function padRight(str, max, chr) {
  str = str != null ? str : ''
  str = String(str)
  var length = max - wcwidth(str)
  if (length <= 0) return str
  return str + repeatString(chr || ' ', length)
}
function padRight(str, max, chr) {
  str = str != null ? str : ''
  str = String(str)
  var length = max - wcwidth(str)
  if (length <= 0) return str
  return str + repeatString(chr || ' ', length)
}
function padRight ( str , max , chr ) { str = str != null ? str : '' str = String ( str ) var length = max - wcwidth ( str ) if ( length <= 0 ) return str return str + repeatString ( chr || ' ' , length ) }
Pad `str` up to total length `max` with `chr`.
If `str` is longer than `max`, padRight will return `str` unaltered.

@param String str string to pad
@param Number max total length of output string
@param String chr optional. Character to pad with. default: ' '
@return String padded str
Pad str up to total length max with chr . If str is longer than max padRight will return str unaltered .