Skip to content

Commit

Permalink
process: refactor internal/process.js export style
Browse files Browse the repository at this point in the history
PR-URL: #12644
Reviewed-By: Brian White <mscdex@mscdex.net>
  • Loading branch information
jasnell committed May 1, 2017
1 parent 0f58d3c commit 579ff2a
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions lib/internal/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
};
Expand Down Expand Up @@ -267,3 +257,14 @@ function setupRawDebug() {
rawDebug(format.apply(null, arguments));
};
}

module.exports = {
setup_cpuUsage,
setup_hrtime,
setupMemoryUsage,
setupConfig,
setupKillAndExit,
setupSignalHandlers,
setupChannel,
setupRawDebug
};

0 comments on commit 579ff2a

Please sign in to comment.