utils.js
function repeatString(str, len) {
  return Array.apply(null, {length: len + 1}).join(str).slice(0, len)
}
function repeatString(str, len) {
  return Array.apply(null, {length: len + 1}).join(str).slice(0, len)
}
function repeatString ( str , len ) { return Array . apply ( null , { length : len + 1 } ) . join ( str ) . slice ( 0 , len ) }
repeat string `str` up to total length of `len`

@param String str string to repeat
@param Number len total length of output string
repeat string str up to total length of len