index.js
function paddLeft(str, length, what) {
	if (length <= str.length) {
		return str.substring(0, length);
	}
	what = what || ' ';
	return what.repeat(length - str.length) + str;
}
function paddLeft(str, length, what) {
	if (length <= str.length) {
		return str.substring(0, length);
	}
	what = what || ' ';
	return what.repeat(length - str.length) + str;
}
function paddLeft ( str , length , what ) { if ( length <= str . length ) { return str . substring ( 0 , length ) ; } what = what || ' ' ; return what . repeat ( length - str . length ) + str ; }
Padds or truncates a string left.
@param  {String} str    The string to be modified
@param  {Number} length Length of the final string
@param  {String} what   The padding string(should be one character)
@return {String}
Padds or truncates a string left .