summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSebastiaan Deckers <sebdeckers83@gmail.com>2017-07-10 20:55:21 -0400
committerRefael Ackermann <refack@gmail.com>2017-07-21 15:13:47 -0400
commitbb294059040def8e8c0b1719cc17f6537ab5cb39 (patch)
treeacc6b7bcf88da8e6078fa5ab91f6718289f32bbf /lib
parent4f875222445b07016a8294fa5a5bf7418c735489 (diff)
downloadandroid-node-v8-bb294059040def8e8c0b1719cc17f6537ab5cb39.tar.gz
android-node-v8-bb294059040def8e8c0b1719cc17f6537ab5cb39.tar.bz2
android-node-v8-bb294059040def8e8c0b1719cc17f6537ab5cb39.zip
lib,src: fix consistent spacing inside braces
PR-URL: https://github.com/nodejs/node/pull/14162 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/console.js2
-rw-r--r--lib/dgram.js2
-rw-r--r--lib/dns.js2
-rw-r--r--lib/fs.js8
-rw-r--r--lib/inspector.js2
-rw-r--r--lib/internal/bootstrap_node.js2
-rw-r--r--lib/internal/child_process.js8
-rw-r--r--lib/internal/cluster/master.js2
-rw-r--r--lib/internal/socket_list.js2
-rw-r--r--lib/internal/util.js4
-rw-r--r--lib/readline.js4
-rw-r--r--lib/repl.js2
12 files changed, 20 insertions, 20 deletions
diff --git a/lib/console.js b/lib/console.js
index 6358a3e19d..4b76bac880 100644
--- a/lib/console.js
+++ b/lib/console.js
@@ -124,7 +124,7 @@ Console.prototype.error = Console.prototype.warn;
Console.prototype.dir = function dir(object, options) {
- options = Object.assign({customInspect: false}, options);
+ options = Object.assign({ customInspect: false }, options);
write(this._ignoreErrors,
this._stdout,
`${util.inspect(object, options)}\n`,
diff --git a/lib/dgram.js b/lib/dgram.js
index 0b2d9e5ebd..178ece8738 100644
--- a/lib/dgram.js
+++ b/lib/dgram.js
@@ -408,7 +408,7 @@ Socket.prototype.send = function(buffer,
this._healthCheck();
if (this._bindState === BIND_STATE_UNBOUND)
- this.bind({port: 0, exclusive: true}, null);
+ this.bind({ port: 0, exclusive: true }, null);
if (list.length === 0)
list.push(Buffer.alloc(0));
diff --git a/lib/dns.js b/lib/dns.js
index 8f84a07950..877dc6218a 100644
--- a/lib/dns.js
+++ b/lib/dns.js
@@ -164,7 +164,7 @@ function lookup(hostname, options, callback) {
if (matchedFamily) {
if (all) {
process.nextTick(
- callback, null, [{address: hostname, family: matchedFamily}]);
+ callback, null, [{ address: hostname, family: matchedFamily }]);
} else {
process.nextTick(callback, null, hostname, matchedFamily);
}
diff --git a/lib/fs.js b/lib/fs.js
index a5403d50f9..d733a0eaa5 100644
--- a/lib/fs.js
+++ b/lib/fs.js
@@ -253,10 +253,10 @@ function statsFromValues() {
// Don't allow mode to accidentally be overwritten.
Object.defineProperties(fs, {
- F_OK: {enumerable: true, value: constants.F_OK || 0},
- R_OK: {enumerable: true, value: constants.R_OK || 0},
- W_OK: {enumerable: true, value: constants.W_OK || 0},
- X_OK: {enumerable: true, value: constants.X_OK || 0},
+ F_OK: { enumerable: true, value: constants.F_OK || 0 },
+ R_OK: { enumerable: true, value: constants.R_OK || 0 },
+ W_OK: { enumerable: true, value: constants.W_OK || 0 },
+ X_OK: { enumerable: true, value: constants.X_OK || 0 },
});
function handleError(val, callback) {
diff --git a/lib/inspector.js b/lib/inspector.js
index 6a80c36d52..a7de5478f2 100644
--- a/lib/inspector.js
+++ b/lib/inspector.js
@@ -62,7 +62,7 @@ class Session extends EventEmitter {
throw new Error('Session is not connected');
}
const id = this[nextIdSymbol]++;
- const message = {id, method};
+ const message = { id, method };
if (params) {
message['params'] = params;
}
diff --git a/lib/internal/bootstrap_node.js b/lib/internal/bootstrap_node.js
index 0c82e5e36d..feb6b3e366 100644
--- a/lib/internal/bootstrap_node.js
+++ b/lib/internal/bootstrap_node.js
@@ -454,7 +454,7 @@
// wrap it
source = Module.wrap(source);
// compile the script, this will throw if it fails
- new vm.Script(source, {displayErrors: true, filename});
+ new vm.Script(source, { displayErrors: true, filename });
}
// Below you find a minimal module system, which is used to load the node
diff --git a/lib/internal/child_process.js b/lib/internal/child_process.js
index 216a2fb85a..b88f5423ac 100644
--- a/lib/internal/child_process.js
+++ b/lib/internal/child_process.js
@@ -110,7 +110,7 @@ const handleConversion = {
},
got: function(message, handle, emit) {
- var socket = new net.Socket({handle: handle});
+ var socket = new net.Socket({ handle: handle });
socket.readable = socket.writable = true;
// if the socket was created by net.Server we will track the socket
@@ -584,7 +584,7 @@ function setupChannel(target, channel) {
options);
}
- options = Object.assign({swallowErrors: false}, options);
+ options = Object.assign({ swallowErrors: false }, options);
if (this.connected) {
return this._send(message, handle, options, callback);
@@ -606,7 +606,7 @@ function setupChannel(target, channel) {
// Support legacy function signature
if (typeof options === 'boolean') {
- options = {swallowErrors: options};
+ options = { swallowErrors: options };
}
// package messages with a handle object
@@ -840,7 +840,7 @@ function _validateStdio(stdio, sync) {
}
if (stdio === 'ignore') {
- acc.push({type: 'ignore'});
+ acc.push({ type: 'ignore' });
} else if (stdio === 'pipe' || typeof stdio === 'number' && stdio < 0) {
var a = {
type: 'pipe',
diff --git a/lib/internal/cluster/master.js b/lib/internal/cluster/master.js
index 05663e792b..4ccf039322 100644
--- a/lib/internal/cluster/master.js
+++ b/lib/internal/cluster/master.js
@@ -12,7 +12,7 @@ const cluster = new EventEmitter();
const intercom = new EventEmitter();
const SCHED_NONE = 1;
const SCHED_RR = 2;
-const {isLegalPort} = require('internal/net');
+const { isLegalPort } = require('internal/net');
module.exports = cluster;
diff --git a/lib/internal/socket_list.js b/lib/internal/socket_list.js
index f6091c0c66..8aa12d45d4 100644
--- a/lib/internal/socket_list.js
+++ b/lib/internal/socket_list.js
@@ -104,4 +104,4 @@ class SocketListReceive extends EventEmitter {
}
}
-module.exports = {SocketListSend, SocketListReceive};
+module.exports = { SocketListSend, SocketListReceive };
diff --git a/lib/internal/util.js b/lib/internal/util.js
index 1eacb95f2c..735f78d4ac 100644
--- a/lib/internal/util.js
+++ b/lib/internal/util.js
@@ -150,8 +150,8 @@ function createClassWrapper(type) {
}
// Mask the wrapper function name and length values
Object.defineProperties(fn, {
- name: {value: type.name},
- length: {value: type.length}
+ name: { value: type.name },
+ length: { value: type.length }
});
Object.setPrototypeOf(fn, type);
fn.prototype = type.prototype;
diff --git a/lib/readline.js b/lib/readline.js
index b757247e34..a022a1991c 100644
--- a/lib/readline.js
+++ b/lib/readline.js
@@ -692,7 +692,7 @@ Interface.prototype._getDisplayPos = function(str) {
}
var cols = offset % col;
var rows = row + (offset - cols) / col;
- return {cols: cols, rows: rows};
+ return { cols: cols, rows: rows };
};
@@ -711,7 +711,7 @@ Interface.prototype._getCursorPos = function() {
rows++;
cols = 0;
}
- return {cols: cols, rows: rows};
+ return { cols: cols, rows: rows };
};
diff --git a/lib/repl.js b/lib/repl.js
index 0b621ac4a2..79abb35ce2 100644
--- a/lib/repl.js
+++ b/lib/repl.js
@@ -1055,7 +1055,7 @@ REPLServer.prototype.parseREPLKeyword = function(keyword, rest) {
REPLServer.prototype.defineCommand = function(keyword, cmd) {
if (typeof cmd === 'function') {
- cmd = {action: cmd};
+ cmd = { action: cmd };
} else if (typeof cmd.action !== 'function') {
throw new errors.TypeError('ERR_INVALID_ARG_TYPE',
'action', 'function', cmd.action);