3 Object.defineProperty(exports, "__esModule", {
6 exports.default = void 0;
8 var _isString = _interopRequireDefault(require("is-string"));
10 var _wrapCell = _interopRequireDefault(require("./wrapCell"));
12 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15 * @param {string} value
16 * @param {number} columnWidth
17 * @param {boolean} useWrapWord
20 const calculateCellHeight = (value, columnWidth, useWrapWord = false) => {
21 if (!(0, _isString.default)(value)) {
22 throw new TypeError('Value must be a string.');
25 if (!Number.isInteger(columnWidth)) {
26 throw new TypeError('Column width must be an integer.');
29 if (columnWidth < 1) {
30 throw new Error('Column width must be greater than 0.');
33 return (0, _wrapCell.default)(value, columnWidth, useWrapWord).length;
36 var _default = calculateCellHeight;
37 exports.default = _default;
38 //# sourceMappingURL=calculateCellHeight.js.map