From 62e96096faf5ebe159352e19dad7d39073e5bd21 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Wed, 15 Feb 2017 14:29:00 -0800 Subject: lib: more consistent use of module.exports = {} model MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Switch to using the more efficient module.exports = {} where possible. PR-URL: https://github.com/nodejs/node/pull/11406 Reviewed-By: Anna Henningsen Reviewed-By: Michaƫl Zasso --- lib/internal/net.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/internal/net.js') 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 +}; -- cgit v1.2.3