From 6489423187e460c31a4922c1073ef5c69bc3ab14 Mon Sep 17 00:00:00 2001 From: Pancake <71993095+Cinnamonsroll@users.noreply.github.com> Date: Wed, 22 Sep 2021 21:44:24 -0400 Subject: [PATCH] console: avoid unnecessary variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By using destruction re-naming useless variables were eliminated. PR-URL: https://github.com/nodejs/node/pull/40183 Reviewed-By: Antoine du Hamel Reviewed-By: Michaƫl Zasso Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Zijian Liu Reviewed-By: Luigi Pinca Reviewed-By: Khaidi Chu --- lib/internal/console/constructor.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/internal/console/constructor.js b/lib/internal/console/constructor.js index 22b84e5e42b956..04567423f78674 100644 --- a/lib/internal/console/constructor.js +++ b/lib/internal/console/constructor.js @@ -58,18 +58,14 @@ const { isTypedArray, isSet, isMap, isSetIterator, isMapIterator, } = require('internal/util/types'); const { - CHAR_LOWERCASE_B, - CHAR_LOWERCASE_E, - CHAR_LOWERCASE_N, - CHAR_UPPERCASE_C, + CHAR_LOWERCASE_B: kTraceBegin, + CHAR_LOWERCASE_E: kTraceEnd, + CHAR_LOWERCASE_N: kTraceInstant, + CHAR_UPPERCASE_C: kTraceCount, } = require('internal/constants'); const kCounts = Symbol('counts'); const kTraceConsoleCategory = 'node,node.console'; -const kTraceCount = CHAR_UPPERCASE_C; -const kTraceBegin = CHAR_LOWERCASE_B; -const kTraceEnd = CHAR_LOWERCASE_E; -const kTraceInstant = CHAR_LOWERCASE_N; const kSecond = 1000; const kMinute = 60 * kSecond;