"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=void0;var_calculateCellWidthIndex=_interopRequireDefault(require("./calculateCellWidthIndex"));function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{default:obj};}/** * Produces an array of values that describe the largest value length (width) in every column. * * @param {Array[]} rows * @returns {number[]} */constcalculateMaximumColumnWidthIndex=rows=>{if(!rows[0]){thrownewError('Dataset must have at least one row.');}constcolumns=newArray(rows[0].length).fill(0);rows.forEach(row=>{constcolumnWidthIndex=(0,_calculateCellWidthIndex.default)(row);columnWidthIndex.forEach((valueWidth,index0)=>{if(columns[index0]<valueWidth){columns[index0]=valueWidth;}});});returncolumns;};var_default=calculateMaximumColumnWidthIndex;exports.default=_default;//# sourceMappingURL=calculateMaximumColumnWidthIndex.js.map