This repository has been archived on 2022-01-16. You can view files and clone it, but cannot push or open issues or pull requests.
irreligious/node_modules/table/dist/calculateCellHeight.js

12 lines
445 B
JavaScript
Raw Normal View History

2021-09-04 22:21:14 -05:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.calculateCellHeight = void 0;
const wrapCell_1 = require("./wrapCell");
/**
* Calculates height of cell content in regard to its width and word wrapping.
*/
const calculateCellHeight = (value, columnWidth, useWrapWord = false) => {
return wrapCell_1.wrapCell(value, columnWidth, useWrapWord).length;
};
exports.calculateCellHeight = calculateCellHeight;