From af102c6d277165a641a4082b0641388807985875 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 18 Jan 2019 16:09:54 -0500 Subject: tools: update ESLint to 5.12.1 Update ESLint to 5.12.1 PR-URL: https://github.com/nodejs/node/pull/25573 Reviewed-By: Wyatt Preul Reviewed-By: Masashi Hirano --- .../eslint/node_modules/table/dist/calculateCellHeight.js.flow | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'tools/node_modules/eslint/node_modules/table/dist/calculateCellHeight.js.flow') 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; }; -- cgit v1.2.3