Skip to content

Commit

Permalink
lib: remove require('util') from inspector.js
Browse files Browse the repository at this point in the history
Remove public require('util') and replace util.isFunction with internal/util/isFunction

Fixes: nodejs#26546
  • Loading branch information
anantsinha committed Mar 10, 2019
1 parent b4e24e3 commit 9ad84b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if (!hasInspector)

const EventEmitter = require('events');
const { validateString } = require('internal/validators');
const util = require('util');
const isFunction = require('internal/util/isFunction');
const { Connection, open, url } = internalBinding('inspector');

const connectionSymbol = Symbol('connectionProperty');
Expand Down Expand Up @@ -68,7 +68,7 @@ class Session extends EventEmitter {

post(method, params, callback) {
validateString(method, 'method');
if (!callback && util.isFunction(params)) {
if (!callback && isFunction(params)) {
callback = params;
params = null;
}
Expand Down

0 comments on commit 9ad84b0

Please sign in to comment.