GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — net: replace brand checks with identity checks · nodejs/node@d07bd79

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • net.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/net.js‎

Copy file name to clipboardExpand all lines: lib/net.js
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ function Socket(options) {
381381
'is not supported',
382382
);
383383
}
384-
if (typeof options?.keepAliveInitialDelay !== 'undefined') {
384+
if (options?.keepAliveInitialDelay !== undefined) {
385385
validateNumber(
386386
options?.keepAliveInitialDelay, 'options.keepAliveInitialDelay',
387387
);
@@ -1319,7 +1319,7 @@ function lookupAndConnect(self, options) {
13191319
validateNumber(localPort, 'options.localPort');
13201320
}
13211321

1322-
if (typeof port !== 'undefined') {
1322+
if (port !== undefined) {
13231323
if (typeof port !== 'number' && typeof port !== 'string') {
13241324
throw new ERR_INVALID_ARG_TYPE('options.port',
13251325
['number', 'string'], port);
@@ -1776,7 +1776,7 @@ function Server(options, connectionListener) {
17761776
} else {
17771777
throw new ERR_INVALID_ARG_TYPE('options', 'Object', options);
17781778
}
1779-
if (typeof options.keepAliveInitialDelay !== 'undefined') {
1779+
if (options.keepAliveInitialDelay !== undefined) {
17801780
validateNumber(
17811781
options.keepAliveInitialDelay, 'options.keepAliveInitialDelay',
17821782
);
@@ -1785,7 +1785,7 @@ function Server(options, connectionListener) {
17851785
options.keepAliveInitialDelay = 0;
17861786
}
17871787
}
1788-
if (typeof options.highWaterMark !== 'undefined') {
1788+
if (options.highWaterMark !== undefined) {
17891789
validateNumber(
17901790
options.highWaterMark, 'options.highWaterMark',
17911791
);
@@ -2076,7 +2076,7 @@ Server.prototype.listen = function(...args) {
20762076
// or (options[, cb]) where options.port is explicitly set as undefined or
20772077
// null, bind to an arbitrary unused port
20782078
if (args.length === 0 || typeof args[0] === 'function' ||
2079-
(typeof options.port === 'undefined' && 'port' in options) ||
2079+
(options.port === undefined && 'port' in options) ||
20802080
options.port === null) {
20812081
options.port = 0;
20822082
}

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.