From 579ff2a487efc54e0730418dcaa965397e436dc3 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Mon, 24 Apr 2017 15:38:37 -0700 Subject: [PATCH] process: refactor internal/process.js export style PR-URL: https://github.com/nodejs/node/pull/12644 Reviewed-By: Brian White --- lib/internal/process.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/internal/process.js b/lib/internal/process.js index 236c0f7da3d496..921b693df3299f 100644 --- a/lib/internal/process.js +++ b/lib/internal/process.js @@ -9,16 +9,6 @@ function lazyConstants() { return _lazyConstants; } -exports.setup_cpuUsage = setup_cpuUsage; -exports.setup_hrtime = setup_hrtime; -exports.setupMemoryUsage = setupMemoryUsage; -exports.setupConfig = setupConfig; -exports.setupKillAndExit = setupKillAndExit; -exports.setupSignalHandlers = setupSignalHandlers; -exports.setupChannel = setupChannel; -exports.setupRawDebug = setupRawDebug; - - const assert = process.assert = function(x, msg) { if (!x) throw new Error(msg || 'assertion error'); }; @@ -267,3 +257,14 @@ function setupRawDebug() { rawDebug(format.apply(null, arguments)); }; } + +module.exports = { + setup_cpuUsage, + setup_hrtime, + setupMemoryUsage, + setupConfig, + setupKillAndExit, + setupSignalHandlers, + setupChannel, + setupRawDebug +};