diff --git a/lib/internal/worker/io.js b/lib/internal/worker/io.js index 2f1352fdf910b8..e2872275dd3a5d 100644 --- a/lib/internal/worker/io.js +++ b/lib/internal/worker/io.js @@ -15,7 +15,7 @@ const { threadId } = internalBinding('worker'); const { Readable, Writable } = require('stream'); const EventEmitter = require('events'); -const util = require('util'); +const { inspect } = require('internal/util/inspect'); let debuglog; function debug(...args) { @@ -119,7 +119,7 @@ MessagePort.prototype.close = function(cb) { MessagePortPrototype.close.call(this); }; -Object.defineProperty(MessagePort.prototype, util.inspect.custom, { +Object.defineProperty(MessagePort.prototype, inspect.custom, { enumerable: false, writable: false, value: function inspect() { // eslint-disable-line func-name-matching