Skip to content

Commit

Permalink
events: fix duplicate require which cause performance penalty
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwzbwcom committed Sep 15, 2021
1 parent bbd4c6e commit 0363f24
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/events.js
Expand Up @@ -50,6 +50,7 @@ const {
SymbolAsyncIterator,
} = primordials;
const kRejection = SymbolFor('nodejs.rejection');
const { inspect } = require('internal/util/inspect');

let spliceOne;

Expand All @@ -63,10 +64,6 @@ const {
},
} = require('internal/errors');

const {
inspect
} = require('internal/util/inspect');

const {
validateAbortSignal,
validateBoolean,
Expand Down Expand Up @@ -372,7 +369,6 @@ EventEmitter.prototype.emit = function emit(type, ...args) {
}

let stringifiedEr;
const { inspect } = require('internal/util/inspect');
try {
stringifiedEr = inspect(er);
} catch {
Expand Down

0 comments on commit 0363f24

Please sign in to comment.