From a6d68ea99a2790ffa6a5326a4f1887fe0f5e7625 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 --- 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; }