From 6dfbe12608d4ba555dd8dbdd071cfa6b9b894ab8 Mon Sep 17 00:00:00 2001 From: Rhys Date: Sun, 24 Jul 2022 07:56:52 -0400 Subject: [PATCH] util: remove unicode support todo for perf implications PR-URL: https://github.com/nodejs/node/pull/43762 Refs: https://github.com/nodejs/node/pull/43721 Reviewed-By: Luigi Pinca Reviewed-By: Joyee Cheung Reviewed-By: Ruben Bridgewater --- lib/internal/util/inspect.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/internal/util/inspect.js b/lib/internal/util/inspect.js index 4c24016757196f..17d567eb9db368 100644 --- a/lib/internal/util/inspect.js +++ b/lib/internal/util/inspect.js @@ -1596,8 +1596,9 @@ function formatPrimitive(fn, value, ctx) { trailer = `... ${remaining} more character${remaining > 1 ? 's' : ''}`; } if (ctx.compact !== true && - // TODO(BridgeAR): Add unicode support. Use the readline getStringWidth - // function. + // We do not support handling unicode characters width with + // the readline getStringWidth function as there are + // performance implications. value.length > kMinLineLength && value.length > ctx.breakLength - ctx.indentationLvl - 4) { return value