diff options
author | James M Snell <jasnell@gmail.com> | 2017-02-15 14:29:00 -0800 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-02-22 08:56:08 -0800 |
commit | 62e96096faf5ebe159352e19dad7d39073e5bd21 (patch) | |
tree | 5b300d85e7a9b2d6318f87499c4cd412cf775271 /lib/internal/net.js | |
parent | 88c3f57cc35f035f793e4b5dad6e8e880eb6003a (diff) | |
download | android-node-v8-62e96096faf5ebe159352e19dad7d39073e5bd21.tar.gz android-node-v8-62e96096faf5ebe159352e19dad7d39073e5bd21.tar.bz2 android-node-v8-62e96096faf5ebe159352e19dad7d39073e5bd21.zip |
lib: more consistent use of module.exports = {} model
Switch to using the more efficient module.exports = {}
where possible.
PR-URL: https://github.com/nodejs/node/pull/11406
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'lib/internal/net.js')
-rw-r--r-- | lib/internal/net.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/internal/net.js b/lib/internal/net.js index d19bc4c219..8f279cad16 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) { @@ -16,3 +14,8 @@ function assertPort(port) { if (typeof port !== 'undefined' && !isLegalPort(port)) throw new RangeError('"port" argument must be >= 0 and < 65536'); } + +module.exports = { + isLegalPort, + assertPort +}; |