massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / table / dist / src / calculateCellWidths.js
1 "use strict";
2 var __importDefault = (this && this.__importDefault) || function (mod) {
3     return (mod && mod.__esModule) ? mod : { "default": mod };
4 };
5 Object.defineProperty(exports, "__esModule", { value: true });
6 exports.calculateCellWidths = void 0;
7 const string_width_1 = __importDefault(require("string-width"));
8 /**
9  * Calculates width of each cell contents in a row.
10  */
11 const calculateCellWidths = (cells) => {
12     return cells.map((cell) => {
13         return Math.max(...cell.split('\n').map(string_width_1.default));
14     });
15 };
16 exports.calculateCellWidths = calculateCellWidths;
17 //# sourceMappingURL=calculateCellWidths.js.map