Fix style
This commit is contained in:
parent
783f5019b0
commit
f23eb282c0
@ -177,8 +177,7 @@ ChildProcess.prototype.spawn = function (path, args, options, customFds) {
|
|||||||
cwd = "";
|
cwd = "";
|
||||||
env = options || process.env;
|
env = options || process.env;
|
||||||
customFds = customFds || [-1, -1, -1];
|
customFds = customFds || [-1, -1, -1];
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// Recommended API: (path, args, options)
|
// Recommended API: (path, args, options)
|
||||||
cwd = options.cwd || "";
|
cwd = options.cwd || "";
|
||||||
env = options.env || process.env;
|
env = options.env || process.env;
|
||||||
@ -198,8 +197,7 @@ ChildProcess.prototype.spawn = function (path, args, options, customFds) {
|
|||||||
this.stdin.open(fds[0]);
|
this.stdin.open(fds[0]);
|
||||||
this.stdin.writable = true;
|
this.stdin.writable = true;
|
||||||
this.stdin.readable = false;
|
this.stdin.readable = false;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
this.stdin = null;
|
this.stdin = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -208,8 +206,7 @@ ChildProcess.prototype.spawn = function (path, args, options, customFds) {
|
|||||||
this.stdout.writable = false;
|
this.stdout.writable = false;
|
||||||
this.stdout.readable = true;
|
this.stdout.readable = true;
|
||||||
this.stdout.resume();
|
this.stdout.resume();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
this.stdout = null;
|
this.stdout = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -218,8 +215,7 @@ ChildProcess.prototype.spawn = function (path, args, options, customFds) {
|
|||||||
this.stderr.writable = false;
|
this.stderr.writable = false;
|
||||||
this.stderr.readable = true;
|
this.stderr.readable = true;
|
||||||
this.stderr.resume();
|
this.stderr.resume();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
this.stderr = null;
|
this.stderr = null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
12
lib/sys.js
12
lib/sys.js
@ -181,8 +181,7 @@ exports.inspect = function (obj, showHidden, depth, colors) {
|
|||||||
if (seen.indexOf(value[key]) < 0) {
|
if (seen.indexOf(value[key]) < 0) {
|
||||||
if ( recurseTimes === null) {
|
if ( recurseTimes === null) {
|
||||||
str = format(value[key]);
|
str = format(value[key]);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
str = format(value[key], recurseTimes - 1);
|
str = format(value[key], recurseTimes - 1);
|
||||||
}
|
}
|
||||||
if (str.indexOf('\n') > -1) {
|
if (str.indexOf('\n') > -1) {
|
||||||
@ -190,8 +189,7 @@ exports.inspect = function (obj, showHidden, depth, colors) {
|
|||||||
str = str.split('\n').map(function(line) {
|
str = str.split('\n').map(function(line) {
|
||||||
return ' ' + line;
|
return ' ' + line;
|
||||||
}).join('\n').substr(2);
|
}).join('\n').substr(2);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
str = '\n' + str.split('\n').map(function(line) {
|
str = '\n' + str.split('\n').map(function(line) {
|
||||||
return ' ' + line;
|
return ' ' + line;
|
||||||
}).join('\n');
|
}).join('\n');
|
||||||
@ -209,8 +207,7 @@ exports.inspect = function (obj, showHidden, depth, colors) {
|
|||||||
if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
|
if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
|
||||||
name = name.substr(1, name.length-2);
|
name = name.substr(1, name.length-2);
|
||||||
name = stylize(name, "name");
|
name = stylize(name, "name");
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
name = name.replace(/'/g, "\\'")
|
name = name.replace(/'/g, "\\'")
|
||||||
.replace(/\\"/g, '"')
|
.replace(/\\"/g, '"')
|
||||||
.replace(/(^"|"$)/g, "'");
|
.replace(/(^"|"$)/g, "'");
|
||||||
@ -238,8 +235,7 @@ exports.inspect = function (obj, showHidden, depth, colors) {
|
|||||||
+ ' '
|
+ ' '
|
||||||
+ braces[1]
|
+ braces[1]
|
||||||
;
|
;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
output = braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
|
output = braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user