summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/node_modules/table/dist/calculateCellHeight.js.flow
diff options
context:
space:
mode:
Diffstat (limited to 'tools/node_modules/eslint/node_modules/table/dist/calculateCellHeight.js.flow')
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/calculateCellHeight.js.flow9
1 files changed, 2 insertions, 7 deletions
diff --git a/tools/node_modules/eslint/node_modules/table/dist/calculateCellHeight.js.flow b/tools/node_modules/eslint/node_modules/table/dist/calculateCellHeight.js.flow
index 94afd37421..3eca8d7ff2 100644
--- a/tools/node_modules/eslint/node_modules/table/dist/calculateCellHeight.js.flow
+++ b/tools/node_modules/eslint/node_modules/table/dist/calculateCellHeight.js.flow
@@ -1,6 +1,5 @@
import _ from 'lodash';
-import stringWidth from 'string-width';
-import wrapWord from './wrapWord';
+import wrapCell from './wrapCell';
/**
* @param {string} value
@@ -21,9 +20,5 @@ export default (value, columnWidth, useWrapWord = false) => {
throw new Error('Column width must be greater than 0.');
}
- if (useWrapWord) {
- return wrapWord(value, columnWidth).length;
- }
-
- return Math.ceil(stringWidth(value) / columnWidth);
+ return wrapCell(value, columnWidth, useWrapWord).length;
};