pakmanaged.js
function maxWidth (table) {
        var width = 0
    
        // table might be of the form [leftColumn],
        // or {key: leftColumn}}
        if (!Array.isArray(table)) {
          table = Object.keys(table).map(function (key) {
            return [table[key]]
          })
        }
    
        table.forEach(function (v) {
          width = Math.max(v[0].length, width)
        })
    
        // if we've enabled 'wrap' we should limit
        // the max-width of the left-column.
        if (wrap) width = Math.min(width, parseInt(wrap * 0.5, 10))
    
        return width
      }
function maxWidth (table) {
        var width = 0
    
        // table might be of the form [leftColumn],
        // or {key: leftColumn}}
        if (!Array.isArray(table)) {
          table = Object.keys(table).map(function (key) {
            return [table[key]]
          })
        }
    
        table.forEach(function (v) {
          width = Math.max(v[0].length, width)
        })
    
        // if we've enabled 'wrap' we should limit
        // the max-width of the left-column.
        if (wrap) width = Math.min(width, parseInt(wrap * 0.5, 10))
    
        return width
      }
function maxWidth ( table ) { var width = 0 // table might be of the form [leftColumn], // or {key: leftColumn}} if ( ! Array . isArray ( table ) ) { table = Object . keys ( table ) . map ( function ( key ) { return [ table [ key ] ] } ) } table . forEach ( function ( v ) { width = Math . max ( v [ 0 ] . length , width ) } ) // if we've enabled 'wrap' we should limit // the max-width of the left-column. if ( wrap ) width = Math . min ( width , parseInt ( wrap * 0.5 , 10 ) ) return width }
return the maximum width of a string in the left-hand column of a table.
return the maximum width of a string in the left - hand column of a table .