lib/misc.js
function alignRecords() {
  var colWidths = [];
  var result = void 0;

  // Get max size for each column (have to look at all records)

  for (var _len2 = arguments.length, groups = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
    groups[_key2] = arguments[_key2];
  }

  result = groups.map(function (records) {
    return records.map(function (record) {
      // break record into parts
      var parts = record.toParts();

      parts.forEach(function (part, i) {
        var len = part.replace(remove_colors_re, '').length;

        if (!colWidths[i]) colWidths[i] = 0;
        if (len > colWidths[i]) colWidths[i] = len;
      });

      return parts;
    });
  });

  // Add padding:
  result = result.map(function (records) {
    return records.map(function (recordParts) {
      return recordParts.map(function (part, i) {
        return visualPad(part, colWidths[i]);
      }).join(' ');
    });
  });

  return result;
}
function alignRecords() {
  var colWidths = [];
  var result = void 0;

  // Get max size for each column (have to look at all records)

  for (var _len2 = arguments.length, groups = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
    groups[_key2] = arguments[_key2];
  }

  result = groups.map(function (records) {
    return records.map(function (record) {
      // break record into parts
      var parts = record.toParts();

      parts.forEach(function (part, i) {
        var len = part.replace(remove_colors_re, '').length;

        if (!colWidths[i]) colWidths[i] = 0;
        if (len > colWidths[i]) colWidths[i] = len;
      });

      return parts;
    });
  });

  // Add padding:
  result = result.map(function (records) {
    return records.map(function (recordParts) {
      return recordParts.map(function (part, i) {
        return visualPad(part, colWidths[i]);
      }).join(' ');
    });
  });

  return result;
}
function alignRecords ( ) { var colWidths = [ ] ; var result = void 0 ; // Get max size for each column (have to look at all records) for ( var _len2 = arguments . length , groups = Array ( _len2 ) , _key2 = 0 ; _key2 < _len2 ; _key2 ++ ) { groups [ _key2 ] = arguments [ _key2 ] ; } result = groups . map ( function ( records ) { return records . map ( function ( record ) { // break record into parts var parts = record . toParts ( ) ; parts . forEach ( function ( part , i ) { var len = part . replace ( remove_colors_re , '' ) . length ; if ( ! colWidths [ i ] ) colWidths [ i ] = 0 ; if ( len > colWidths [ i ] ) colWidths [ i ] = len ; } ) ; return parts ; } ) ; } ) ; // Add padding: result = result . map ( function ( records ) { return records . map ( function ( recordParts ) { return recordParts . map ( function ( part , i ) { return visualPad ( part , colWidths [ i ] ) ; } ) . join ( ' ' ) ; } ) ; } ) ; return result ; }
Make a table of records strings that have equal column lengths.

Ex, turn groups of records:
[
[
Host.local. * QU,
]
[
Host.local. A 10 169.254.132.42,
Host.local. AAAA 10 fe80::c17c:ec1c:530d:842a,
]
]

into a more readable form that can be printed:
[
[
'Host.local. *    QU'
]
[
'Host.local. A    10 169.254.132.42'
'Host.local. AAAA 10 fe80::c17c:ec1c:530d:842a'
]
]

@param  {...ResourceRecords[]} groups
@return {string[][]}
Make a table of records strings that have equal column lengths .