minimal adjustments
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / table / dist / truncateTableData.js.flow
1 import truncate from 'lodash.truncate';
2
3 /**
4  * @todo Make it work with ASCII content.
5  * @param {table~row[]} rows
6  * @param {object} config
7  * @returns {table~row[]}
8  */
9 export default (rows, config) => {
10   return rows.map((cells) => {
11     return cells.map((content, index) => {
12       return truncate(content, {
13         length: config.columns[index].truncate,
14       });
15     });
16   });
17 };