We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10370c5 commit 4174f13Copy full SHA for 4174f13
lib/net.js
@@ -102,6 +102,7 @@ const {
102
const { isUint8Array } = require('internal/util/types');
103
const {
104
validateAbortSignal,
105
+ validateFunction,
106
validateInt32,
107
validateNumber,
108
validatePort,
@@ -1002,10 +1003,8 @@ function lookupAndConnect(self, options) {
1002
1003
return;
1004
}
1005
- if (options.lookup && typeof options.lookup !== 'function')
1006
- throw new ERR_INVALID_ARG_TYPE('options.lookup',
1007
- 'Function', options.lookup);
1008
-
+ if (options.lookup !== undefined)
+ validateFunction(options.lookup, 'options.lookup');
1009
1010
if (dns === undefined) dns = require('dns');
1011
const dnsopts = {
0 commit comments