el-beeswarm
Version:
<div style="display: flex; padding: 1rem; flex-direction: column; align-items: center; justify-content: center; height: 100vh; text-align: center; display: flex;
18 lines (16 loc) • 375 B
Flow
import _ from 'lodash';
/**
* @todo Make it work with ASCII content.
* @param {table~row[]} rows
* @param {object} config
* @returns {table~row[]}
*/
export default (rows, config) => {
return rows.map((cells) => {
return cells.map((content, index) => {
return _.truncate(content, {
length: config.columns[index].truncate,
});
});
});
};