Skip to content

Commit

Permalink
console: avoid unnecessary variables
Browse files Browse the repository at this point in the history
By using destruction re-naming useless variables were eliminated.

PR-URL: #40183
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
  • Loading branch information
Cinnamonsroll authored and targos committed Oct 4, 2021
1 parent 59db829 commit 6489423
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions lib/internal/console/constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6489423

Please sign in to comment.