worker: remove usage of require('util')
PR-URL: https://github.com/nodejs/node/pull/26810 Refs: https://github.com/nodejs/node/issues/26546 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
parent
76387c1c20
commit
01a129635c
@ -18,7 +18,7 @@ const {
|
|||||||
|
|
||||||
const { Readable, Writable } = require('stream');
|
const { Readable, Writable } = require('stream');
|
||||||
const EventEmitter = require('events');
|
const EventEmitter = require('events');
|
||||||
const util = require('util');
|
const { inspect } = require('internal/util/inspect');
|
||||||
|
|
||||||
let debuglog;
|
let debuglog;
|
||||||
function debug(...args) {
|
function debug(...args) {
|
||||||
@ -122,7 +122,7 @@ MessagePort.prototype.close = function(cb) {
|
|||||||
MessagePortPrototype.close.call(this);
|
MessagePortPrototype.close.call(this);
|
||||||
};
|
};
|
||||||
|
|
||||||
Object.defineProperty(MessagePort.prototype, util.inspect.custom, {
|
Object.defineProperty(MessagePort.prototype, inspect.custom, {
|
||||||
enumerable: false,
|
enumerable: false,
|
||||||
writable: false,
|
writable: false,
|
||||||
value: function inspect() { // eslint-disable-line func-name-matching
|
value: function inspect() { // eslint-disable-line func-name-matching
|
||||||
|
Loading…
x
Reference in New Issue
Block a user