packages/route-table/lib/table.js
function getMaxLength (keys, objArray) {
  const maxRowLength = {}
  _.forEach(keys, function (key) {
    maxRowLength[key] = cleanString(key).length
  })

  _.forEach(objArray, function (objRow) {
    _.forEach(objRow, function (val, key) {
      const rowLength = cleanString(val).length
      if (maxRowLength[key] < rowLength) {
        maxRowLength[key] = rowLength
      }
    })
  })

  return maxRowLength
}
function getMaxLength (keys, objArray) {
  const maxRowLength = {}
  _.forEach(keys, function (key) {
    maxRowLength[key] = cleanString(key).length
  })

  _.forEach(objArray, function (objRow) {
    _.forEach(objRow, function (val, key) {
      const rowLength = cleanString(val).length
      if (maxRowLength[key] < rowLength) {
        maxRowLength[key] = rowLength
      }
    })
  })

  return maxRowLength
}
function getMaxLength ( keys , objArray ) { const maxRowLength = { } _ . forEach ( keys , function ( key ) { maxRowLength [ key ] = cleanString ( key ) . length } ) _ . forEach ( objArray , function ( objRow ) { _ . forEach ( objRow , function ( val , key ) { const rowLength = cleanString ( val ) . length if ( maxRowLength [ key ] < rowLength ) { maxRowLength [ key ] = rowLength } } ) } ) return maxRowLength }
Determines the longest value for each key.

@param keys The keys of the objects within the array.
@param objArray The object array.
@returns {Object} JSON object containing the max length for each key.
Determines the longest value for each key .