Skip to content

Commit

Permalink
lib: remove the use of util.isFunction
Browse files Browse the repository at this point in the history
PR-URL: #29566
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
himself65 authored and Trott committed Sep 18, 2019
1 parent 90b5cdb commit 7fa03b5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 7fa03b5

Please sign in to comment.