From 8eaa1ac46306c429ae40a02de79bdafd35f0867d Mon Sep 17 00:00:00 2001 From: Thom Seddon Date: Tue, 28 Jan 2014 15:33:48 +0000 Subject: [PATCH] lib: Remove unused var+operations in util.inspect This was originally introduced in 6034701 to prevent the closing brace being pushed onto the next line if an object is longer than the max width, however the functionality was removed in d164989 but the supplementary variables (and operations) were left behind --- lib/util.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/util.js b/lib/util.js index de2246cc49f..ee803afa501 100644 --- a/lib/util.js +++ b/lib/util.js @@ -424,10 +424,7 @@ function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { function reduceToSingleString(output, base, braces) { - var numLinesEst = 0; var length = output.reduce(function(prev, cur) { - numLinesEst++; - if (cur.indexOf('\n') >= 0) numLinesEst++; return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; }, 0);