Comparing version 5.1.1 to 5.2.0
@@ -10,6 +10,4 @@ "use strict"; | ||
var _stringWidth = _interopRequireDefault(require("string-width")); | ||
var _wrapCell = _interopRequireDefault(require("./wrapCell")); | ||
var _wrapWord = _interopRequireDefault(require("./wrapWord")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -36,7 +34,3 @@ | ||
if (useWrapWord) { | ||
return (0, _wrapWord.default)(value, columnWidth).length; | ||
} | ||
return Math.ceil((0, _stringWidth.default)(value) / columnWidth); | ||
return (0, _wrapCell.default)(value, columnWidth, useWrapWord).length; | ||
}; | ||
@@ -43,0 +37,0 @@ |
@@ -10,6 +10,4 @@ "use strict"; | ||
var _wrapString = _interopRequireDefault(require("./wrapString")); | ||
var _wrapCell = _interopRequireDefault(require("./wrapCell")); | ||
var _wrapWord = _interopRequireDefault(require("./wrapWord")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -34,12 +32,5 @@ | ||
cells.forEach((value, index1) => { | ||
let chunkedValue; | ||
if (config.columns[index1].wrapWord) { | ||
chunkedValue = (0, _wrapWord.default)(value, config.columns[index1].width); | ||
} else { | ||
chunkedValue = (0, _wrapString.default)(value, config.columns[index1].width); | ||
} | ||
chunkedValue.forEach((part, index2) => { | ||
rowHeight[index2][index1] = part; | ||
const cellLines = (0, _wrapCell.default)(value, config.columns[index1].width, config.columns[index1].wrapWord); | ||
cellLines.forEach((cellLine, index2) => { | ||
rowHeight[index2][index1] = cellLine; | ||
}); | ||
@@ -46,0 +37,0 @@ }); |
@@ -82,3 +82,3 @@ { | ||
}, | ||
"version": "5.1.1" | ||
"version": "5.2.0" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
193335
78
2842