summaryrefslogtreecommitdiff
path: root/lib/sys.js
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-10-09 12:48:22 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-10-09 12:48:22 -0700
commitf23eb282c01723b94948d6c8a6ca9a135ac69764 (patch)
treedece2c94fe42fda1dbf6540fe0c2e0f511bb6c25 /lib/sys.js
parent783f5019b0fe03cb03c494f7cc5d21d01e03b723 (diff)
downloadnode-new-f23eb282c01723b94948d6c8a6ca9a135ac69764.tar.gz
Fix style
Diffstat (limited to 'lib/sys.js')
-rw-r--r--lib/sys.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/sys.js b/lib/sys.js
index 4da1c057f2..4ffa1ea73f 100644
--- a/lib/sys.js
+++ b/lib/sys.js
@@ -181,8 +181,7 @@ exports.inspect = function (obj, showHidden, depth, colors) {
if (seen.indexOf(value[key]) < 0) {
if ( recurseTimes === null) {
str = format(value[key]);
- }
- else {
+ } else {
str = format(value[key], recurseTimes - 1);
}
if (str.indexOf('\n') > -1) {
@@ -190,8 +189,7 @@ exports.inspect = function (obj, showHidden, depth, colors) {
str = str.split('\n').map(function(line) {
return ' ' + line;
}).join('\n').substr(2);
- }
- else {
+ } else {
str = '\n' + str.split('\n').map(function(line) {
return ' ' + line;
}).join('\n');
@@ -209,8 +207,7 @@ exports.inspect = function (obj, showHidden, depth, colors) {
if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
name = name.substr(1, name.length-2);
name = stylize(name, "name");
- }
- else {
+ } else {
name = name.replace(/'/g, "\\'")
.replace(/\\"/g, '"')
.replace(/(^"|"$)/g, "'");
@@ -238,8 +235,7 @@ exports.inspect = function (obj, showHidden, depth, colors) {
+ ' '
+ braces[1]
;
- }
- else {
+ } else {
output = braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
}