Skip to content

Commit f6e332d

Browse files
TrottMylesBorins
authored andcommitted
lib: implement consistent brace style
This change is in preparation for lint-enforced brace style. PR-URL: #8348 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Myles Borins <[email protected]>
1 parent 4f31071 commit f6e332d

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

lib/_stream_readable.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -802,9 +802,11 @@ Readable.prototype.wrap = function(stream) {
802802
// important when wrapping filters and duplexes.
803803
for (var i in stream) {
804804
if (this[i] === undefined && typeof stream[i] === 'function') {
805-
this[i] = function(method) { return function() {
806-
return stream[method].apply(stream, arguments);
807-
}; }(i);
805+
this[i] = function(method) {
806+
return function() {
807+
return stream[method].apply(stream, arguments);
808+
};
809+
}(i);
808810
}
809811
}
810812

lib/module.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,7 @@ Module._preloadModules = function(requests) {
488488
var parent = new Module('internal/preload', null);
489489
try {
490490
parent.paths = Module._nodeModulePaths(process.cwd());
491-
}
492-
catch (e) {
491+
} catch (e) {
493492
if (e.code !== 'ENOENT') {
494493
throw e;
495494
}

lib/net.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1155,8 +1155,7 @@ function createServerHandle(address, port, addressType, fd) {
11551155
if (typeof fd === 'number' && fd >= 0) {
11561156
try {
11571157
handle = createHandle(fd);
1158-
}
1159-
catch (e) {
1158+
} catch (e) {
11601159
// Not a fd we can listen on. This will trigger an error.
11611160
debug('listen invalid fd=' + fd + ': ' + e.message);
11621161
return uv.UV_EINVAL;

0 commit comments

Comments
 (0)