Version: 0.0.00.0.10.1.00.2.00.3.00.3.10.3.20.4.00.5.00.5.10.5.20.5.30.6.00.6.10.6.20.6.30.6.40.6.50.6.60.6.70.6.80.6.90.7.00.7.10.7.20.7.30.7.40.7.50.7.60.7.70.7.80.7.90.8.00.8.1
'use strict';
/**
* left-pad module
* @module left-pad
* @see module:index
*/
module.exports = (str, total, spacer) => {
spacer = spacer || ' ';
let result = str.toString();
while (result.length < total) {
result = spacer + result;
}
return result;
};