.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / node_modules / table / dist / calculateCellWidthIndex.js
1 'use strict';
2
3 Object.defineProperty(exports, "__esModule", {
4   value: true
5 });
6
7 var _stringWidth = require('string-width');
8
9 var _stringWidth2 = _interopRequireDefault(_stringWidth);
10
11 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
13 /**
14  * Calculates width of each cell contents.
15  *
16  * @param {string[]} cells
17  * @returns {number[]}
18  */
19 exports.default = cells => {
20   return cells.map(value => {
21     return (0, _stringWidth2.default)(value);
22   });
23 };