Skip to content

Commit

Permalink
net: remove an unused internal module assertPort
Browse files Browse the repository at this point in the history
A module `assertPort` in `lib/internal/net.js` is not used anymore.

Refs: nodejs#11667
PR-URL: nodejs#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]>
  • Loading branch information
watilde authored and jungx098 committed Mar 21, 2017
1 parent 9af5ce2 commit 7f8cd16
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions lib/internal/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@ function isLegalPort(port) {
return +port === (+port >>> 0) && port <= 0xFFFF;
}


function assertPort(port) {
if (typeof port !== 'undefined' && !isLegalPort(port))
throw new RangeError('"port" argument must be >= 0 and < 65536');
}

module.exports = {
isLegalPort,
assertPort
isLegalPort
};

0 comments on commit 7f8cd16

Please sign in to comment.