.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / node_modules / table / dist / truncateTableData.js
1 'use strict';
2
3 Object.defineProperty(exports, "__esModule", {
4   value: true
5 });
6
7 var _lodash = require('lodash');
8
9 var _lodash2 = _interopRequireDefault(_lodash);
10
11 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
13 /**
14  * @todo Make it work with ASCII content.
15  * @param {table~row[]} rows
16  * @param {Object} config
17  * @returns {table~row[]}
18  */
19 exports.default = (rows, config) => {
20   return rows.map(cells => {
21     return cells.map((content, index) => {
22       return _lodash2.default.truncate(content, {
23         length: config.columns[index].truncate
24       });
25     });
26   });
27 };