Skip to content

Commit 33ea7a2

Browse files
committed
net: remove an unused internal module assertPort
A module `assertPort` in `lib/internal/net.js` is not used anymore. Refs: #11667 PR-URL: #11812 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
1 parent 57c0e71 commit 33ea7a2

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

lib/internal/net.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
'use strict';
22

3-
module.exports = { isLegalPort, assertPort };
4-
53
// Check that the port number is not NaN when coerced to a number,
64
// is an integer and that it falls within the legal range of port numbers.
75
function isLegalPort(port) {
@@ -11,8 +9,6 @@ function isLegalPort(port) {
119
return +port === (+port >>> 0) && port <= 0xFFFF;
1210
}
1311

14-
15-
function assertPort(port) {
16-
if (typeof port !== 'undefined' && !isLegalPort(port))
17-
throw new RangeError('"port" argument must be >= 0 and < 65536');
18-
}
12+
module.exports = {
13+
isLegalPort
14+
};

0 commit comments

Comments
 (0)