From 144aeeac68ef7908326758874126aaee6b8a5132 Mon Sep 17 00:00:00 2001 From: himself65 Date: Sun, 15 Sep 2019 21:10:00 +0800 Subject: [PATCH] lib: remove the use of util.isFunction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/29566 Reviewed-By: Michaƫl Zasso Reviewed-By: Yongsheng Zhang Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Luigi Pinca --- lib/inspector.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/inspector.js b/lib/inspector.js index 08cf938999183a..2f29506b91bc0e 100644 --- a/lib/inspector.js +++ b/lib/inspector.js @@ -20,7 +20,6 @@ if (!hasInspector) const EventEmitter = require('events'); const { validateString } = require('internal/validators'); -const util = require('util'); const { isMainThread } = require('worker_threads'); const { @@ -86,7 +85,7 @@ class Session extends EventEmitter { post(method, params, callback) { validateString(method, 'method'); - if (!callback && util.isFunction(params)) { + if (!callback && typeof params === 'function') { callback = params; params = null; }