Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
os: name every anonymous function in OS module
There are too many anonymous functions in the source code which makes
the debugging frustrating.

We are fixing this issue by naming every anonymous function in all the
modules.As part of which,this commit contains changes to os module
  • Loading branch information
lprasanthi committed Oct 24, 2016
commit 9e63b3bea176c0a6e3ac8e9ef717204b60f4b680
10 changes: 5 additions & 5 deletions lib/os.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ Object.defineProperty(exports, 'constants', {
value: constants
});

exports.arch = function() {
exports.arch = function arch() {
return process.arch;
};

exports.platform = function() {
exports.platform = function platform() {
return process.platform;
};

exports.tmpdir = function() {
exports.tmpdir = function tmpdir() {
var path;
if (isWindows) {
path = process.env.TEMP ||
Expand Down Expand Up @@ -62,6 +62,6 @@ exports.getNetworkInterfaces = internalUtil.deprecate(function() {
exports.EOL = isWindows ? '\r\n' : '\n';

if (binding.isBigEndian)
exports.endianness = function() { return 'BE'; };
exports.endianness = function endianness() { return 'BE'; };
else
exports.endianness = function() { return 'LE'; };
exports.endianness = function endianness() { return 'LE'; };