Browse Source

lib: implement consistent brace style

This change is in preparation for lint-enforced brace style.

PR-URL: https://github.com/nodejs/node/pull/8348
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
v4.x
Rich Trott 8 years ago
committed by Myles Borins
parent
commit
f6e332da2d
  1. 8
      lib/_stream_readable.js
  2. 3
      lib/module.js
  3. 3
      lib/net.js

8
lib/_stream_readable.js

@ -802,9 +802,11 @@ Readable.prototype.wrap = function(stream) {
// important when wrapping filters and duplexes.
for (var i in stream) {
if (this[i] === undefined && typeof stream[i] === 'function') {
this[i] = function(method) { return function() {
return stream[method].apply(stream, arguments);
}; }(i);
this[i] = function(method) {
return function() {
return stream[method].apply(stream, arguments);
};
}(i);
}
}

3
lib/module.js

@ -488,8 +488,7 @@ Module._preloadModules = function(requests) {
var parent = new Module('internal/preload', null);
try {
parent.paths = Module._nodeModulePaths(process.cwd());
}
catch (e) {
} catch (e) {
if (e.code !== 'ENOENT') {
throw e;
}

3
lib/net.js

@ -1155,8 +1155,7 @@ function createServerHandle(address, port, addressType, fd) {
if (typeof fd === 'number' && fd >= 0) {
try {
handle = createHandle(fd);
}
catch (e) {
} catch (e) {
// Not a fd we can listen on. This will trigger an error.
debug('listen invalid fd=' + fd + ': ' + e.message);
return uv.UV_EINVAL;

Loading…
Cancel
Save