Skip to content

Commit

Permalink
lib: remove usage of require('util')
Browse files Browse the repository at this point in the history
Remove the usage of `require('util').inspect`.

PR-URL: nodejs#26779
Refs: nodejs#26546
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
  • Loading branch information
dnlup authored and BridgeAR committed Mar 24, 2019
1 parent cf1b9d3 commit e5383ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/encoding.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ class TextEncoder {
});
obj.encoding = this.encoding;
// Lazy to avoid circular dependency
return require('util').inspect(obj, opts);
return require('internal/util/inspect').inspect(obj, opts);
}
}

Expand Down Expand Up @@ -528,7 +528,7 @@ function makeTextDecoderJS() {
obj[kHandle] = this[kHandle];
}
// Lazy to avoid circular dependency
return require('util').inspect(obj, opts);
return require('internal/util/inspect').inspect(obj, opts);
}
}));
Object.defineProperties(TextDecoder.prototype, {
Expand Down

0 comments on commit e5383ad

Please sign in to comment.