From 77d00bef5257af3d1a1a9ed4fb1f35ce7e62b2c6 Mon Sep 17 00:00:00 2001 From: toshi1127 Date: Wed, 20 Mar 2019 21:52:50 +0900 Subject: [PATCH] =?UTF-8?q?worker:=20remove=20usage=20of=20require('util')?= =?UTF-8?q?=C2=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/internal/worker/io.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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