src/util.js
function padNumbersToEqualLength(arr) {
  var maxLen = 0;
  var strings = arr.map(function(n) {
    var str = n.toString();
    maxLen = Math.max(maxLen, str.length);
    return str;
  });
  return strings.map(function(s) { return common.padLeft(s, maxLen); });
}
function padNumbersToEqualLength(arr) {
  var maxLen = 0;
  var strings = arr.map(function(n) {
    var str = n.toString();
    maxLen = Math.max(maxLen, str.length);
    return str;
  });
  return strings.map(function(s) { return common.padLeft(s, maxLen); });
}
function padNumbersToEqualLength ( arr ) { var maxLen = 0 ; var strings = arr . map ( function ( n ) { var str = n . toString ( ) ; maxLen = Math . max ( maxLen , str . length ) ; return str ; } ) ; return strings . map ( function ( s ) { return common . padLeft ( s , maxLen ) ; } ) ; }
Given an array of numbers `arr`, return an array of the numbers as strings, right-justified and padded to the same length.
Given an array of numbers arr return an array of the numbers as strings right - justified and padded to the same length .