Sha256: 502d07d27efe6bed02710bfd90d07579f21b1ae8a47c023608bf584a1339f658

Contents?: true

Size: 787 Bytes

Versions: 23

Compression:

Stored size: 787 Bytes

Contents

{"version":3,"sources":["../src/calculateCellWidthIndex.js"],"names":["cells","map","value","Math","max","split","line"],"mappings":";;;;;;;AAAA;;;;AAEA;;;;;;gCAMgBA,K,IAAU;AACxB,SAAOA,KAAK,CAACC,GAAN,CAAWC,KAAD,IAAW;AAC1B,WAAOC,IAAI,CAACC,GAAL,CACL,GAAGF,KAAK,CAACG,KAAN,CAAY,IAAZ,EAAkBJ,GAAlB,CAAuBK,IAAD,IAAU;AACjC,aAAO,0BAAYA,IAAZ,CAAP;AACD,KAFE,CADE,CAAP;AAKD,GANM,CAAP;AAOD,C","sourcesContent":["import stringWidth from 'string-width';\n\n/**\n * Calculates width of each cell contents.\n *\n * @param {string[]} cells\n * @returns {number[]}\n */\nexport default (cells) => {\n  return cells.map((value) => {\n    return Math.max(\n      ...value.split('\\n').map((line) => {\n        return stringWidth(line);\n      })\n    );\n  });\n};\n"],"file":"calculateCellWidthIndex.js"}

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
trusty-cms-5.0.7 node_modules/table/dist/calculateCellWidthIndex.js.map
trusty-cms-5.0.6 node_modules/table/dist/calculateCellWidthIndex.js.map
trusty-cms-5.0.5 node_modules/table/dist/calculateCellWidthIndex.js.map
trusty-cms-5.0.4 node_modules/table/dist/calculateCellWidthIndex.js.map
trusty-cms-5.0.3 node_modules/table/dist/calculateCellWidthIndex.js.map
trusty-cms-5.0.2 node_modules/table/dist/calculateCellWidthIndex.js.map
trusty-cms-5.0.1 node_modules/table/dist/calculateCellWidthIndex.js.map
trusty-cms-4.3.5 node_modules/table/dist/calculateCellWidthIndex.js.map
trusty-cms-5.0.0 node_modules/table/dist/calculateCellWidthIndex.js.map
trusty-cms-4.3.4 node_modules/table/dist/calculateCellWidthIndex.js.map
trusty-cms-4.3.3 node_modules/table/dist/calculateCellWidthIndex.js.map
trusty-cms-4.3.2 node_modules/table/dist/calculateCellWidthIndex.js.map
trusty-cms-4.3.1 node_modules/table/dist/calculateCellWidthIndex.js.map
trusty-cms-4.3 node_modules/table/dist/calculateCellWidthIndex.js.map
trusty-cms-4.2.3 node_modules/table/dist/calculateCellWidthIndex.js.map
trusty-cms-4.2.2 node_modules/table/dist/calculateCellWidthIndex.js.map
trusty-cms-4.2.1 node_modules/table/dist/calculateCellWidthIndex.js.map
trusty-cms-4.2 node_modules/table/dist/calculateCellWidthIndex.js.map
trusty-cms-4.1.9 node_modules/table/dist/calculateCellWidthIndex.js.map
trusty-cms-4.1.8 node_modules/table/dist/calculateCellWidthIndex.js.map