diff --git a/lib/internal/net.js b/lib/internal/net.js index d19bc4c219a796..ce8f549bdfa613 100644 --- a/lib/internal/net.js +++ b/lib/internal/net.js @@ -1,7 +1,5 @@ 'use strict'; -module.exports = { isLegalPort, assertPort }; - // Check that the port number is not NaN when coerced to a number, // is an integer and that it falls within the legal range of port numbers. function isLegalPort(port) { @@ -11,8 +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 +};