Skip to content

Commit 2ee644b

Browse files
committed
untabified .js files
1 parent e75365b commit 2ee644b

File tree

3 files changed

+60
-60
lines changed

3 files changed

+60
-60
lines changed

consolelog.js

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -27,60 +27,60 @@ var disableDoubleNewlines = true;
2727

2828
var dodads = {
2929
"standard_prefix" : ">>> ",
30-
"standard_postfix" : "",
31-
"info_prefix" : "iii ",
32-
"info_postfix" : "",
33-
"warn_prefix" : "*** ",
34-
"warn_postfix" : "",
35-
"error_prefix" : "!!! ",
36-
"error_postfix" : ""
30+
"standard_postfix" : "",
31+
"info_prefix" : "iii ",
32+
"info_postfix" : "",
33+
"warn_prefix" : "*** ",
34+
"warn_postfix" : "",
35+
"error_prefix" : "!!! ",
36+
"error_postfix" : ""
3737
};
3838

3939
var dodadsDefaults = {
4040
"standard_prefix" : ">>> ",
41-
"standard_postfix" : "",
42-
"info_prefix" : "iii ",
43-
"info_postfix" : "",
44-
"warn_prefix" : "*** ",
45-
"warn_postfix" : "",
46-
"error_prefix" : "!!! ",
47-
"error_postfix" : ""
41+
"standard_postfix" : "",
42+
"info_prefix" : "iii ",
43+
"info_postfix" : "",
44+
"warn_prefix" : "*** ",
45+
"warn_postfix" : "",
46+
"error_prefix" : "!!! ",
47+
"error_postfix" : ""
4848
};
4949

5050
var logColors = {
5151
"standard" : tc.colors.RESET,
52-
"info" : tc.colors.GREEN,
53-
"warn" : tc.colors.YELLOW,
54-
"error" : tc.colors.RED
52+
"info" : tc.colors.GREEN,
53+
"warn" : tc.colors.YELLOW,
54+
"error" : tc.colors.RED
5555
};
5656

5757
var logColorsDefaults = {
5858
"standard" : tc.colors.RESET,
59-
"info" : tc.colors.GREEN,
60-
"warn" : tc.colors.YELLOW,
61-
"error" : tc.colors.RED
59+
"info" : tc.colors.GREEN,
60+
"warn" : tc.colors.YELLOW,
61+
"error" : tc.colors.RED
6262
};
6363

6464
var logAttrs = {
6565
"standard" : tc.attrs.DEFAULT,
66-
"info" : tc.attrs.BRIGHT,
67-
"warn" : tc.attrs.BRIGHT,
68-
"error" : tc.attrs.BRIGHT
66+
"info" : tc.attrs.BRIGHT,
67+
"warn" : tc.attrs.BRIGHT,
68+
"error" : tc.attrs.BRIGHT
6969
};
7070

7171
var logAttrsDefaults = {
7272
"standard" : tc.attrs.DEFAULT,
73-
"info" : tc.attrs.BRIGHT,
74-
"warn" : tc.attrs.BRIGHT,
75-
"error" : tc.attrs.BRIGHT
73+
"info" : tc.attrs.BRIGHT,
74+
"warn" : tc.attrs.BRIGHT,
75+
"error" : tc.attrs.BRIGHT
7676
};
7777

7878

7979
var setColor = function(type, color) {
8080
if (typeof color == "number") {
81-
logColors[type] = color;
81+
logColors[type] = color;
8282
} else {
83-
logColors[type] = tc.colors[color];
83+
logColors[type] = tc.colors[color];
8484
}
8585
};
8686

@@ -183,8 +183,8 @@ var restoreDefaults = function() {
183183

184184
var cleanmsg = function(msg) {
185185
if (disableDoubleNewlines) {
186-
msg = msg.replace(/\r\n$/, "");
187-
msg = msg.replace(/\n$/, "");
186+
msg = msg.replace(/\r\n$/, "");
187+
msg = msg.replace(/\n$/, "");
188188
}
189189
return msg;
190190
};
@@ -195,14 +195,14 @@ var dolog = function(type, msg, color, bg, attr) {
195195
tc.terminalSetFont(color, bg, attr);
196196
var prefix, postfix;
197197
if (typeof dodads[type + "_prefix"] == "string") {
198-
prefix = dodads[type + "_prefix"];
198+
prefix = dodads[type + "_prefix"];
199199
} else {
200-
prefix = dodads[type + "_prefix"]();
200+
prefix = dodads[type + "_prefix"]();
201201
}
202202
if (typeof dodads[type + "_postfix"] == "string") {
203-
postfix = dodads[type + "_postfix"];
203+
postfix = dodads[type + "_postfix"];
204204
} else {
205-
postfix = dodads[type + "_postfix"]();
205+
postfix = dodads[type + "_postfix"]();
206206
}
207207

208208
sys.puts(prefix + msg + postfix);

example.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ cl.info("node.js is nifty");
3434

3535

3636
cl.setAllPrefix(function() {
37-
var d = Date.now();
38-
return "[" + d + "] ";
37+
var d = Date.now();
38+
return "[" + d + "] ";
3939
});
4040

4141
cl.log("prefixes can be functions, too");
@@ -50,4 +50,4 @@ try {
5050
cl.restoreDefaults();
5151

5252
cl.info('the end!');
53-
cl.log('hope you find this useful!!');
53+
cl.log('hope you find this useful!!');

termcolors.js

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,24 @@ var sys = require("sys");
1818

1919

2020
var attrs = { "RESET": 0,
21-
"BRIGHT": 1,
22-
"DIM": 2, /* or underline */
23-
"UNDERLINE": 3, /* or reverse */
24-
"BLINK": 4, /* or underline */
25-
"REVERSE": 7,
26-
"HIDDEN": 8, /* or no effect */
27-
"DEFAULT": 9
21+
"BRIGHT": 1,
22+
"DIM": 2, /* or underline */
23+
"UNDERLINE": 3, /* or reverse */
24+
"BLINK": 4, /* or underline */
25+
"REVERSE": 7,
26+
"HIDDEN": 8, /* or no effect */
27+
"DEFAULT": 9
2828
};
2929

3030
var colors = { "BLACK": 0,
31-
"RED": 1,
32-
"GREEN": 2,
33-
"YELLOW": 3,
34-
"BLUE": 4,
35-
"MAGENTA": 5,
36-
"CYAN": 6,
37-
"WHITE": 7,
38-
"RESET": 9
31+
"RED": 1,
32+
"GREEN": 2,
33+
"YELLOW": 3,
34+
"BLUE": 4,
35+
"MAGENTA": 5,
36+
"CYAN": 6,
37+
"WHITE": 7,
38+
"RESET": 9
3939
};
4040

4141
var TERM_ESCAPE = "\033[";
@@ -96,33 +96,33 @@ var resetTerminal = function() {
9696
var test = function(reset) {
9797

9898
if (arguments.length && reset) {
99-
resetTerminal();
99+
resetTerminal();
100100
}
101101
terminalFontReset();
102102
sys.puts("");
103103
sys.puts(">>>>> FONT COLOR TEST <<<<<<");
104104
sys.puts("");
105105
for (var i in colors) {
106-
terminalSetFontColor(colors[i]);
107-
sys.puts(i);
106+
terminalSetFontColor(colors[i]);
107+
sys.puts(i);
108108
}
109109
terminalFontReset();
110110
sys.puts("");
111111
sys.puts(">>>>> FONT BG TEST <<<<<<");
112112
sys.puts("");
113113
terminalSetFontColor(colors.BLACK);
114114
for (var i in colors) {
115-
terminalSetFontBG(colors[i]);
116-
sys.puts(i);
115+
terminalSetFontBG(colors[i]);
116+
sys.puts(i);
117117
}
118118
terminalFontReset();
119119
sys.puts("");
120120
sys.puts(">>>>> FONT BRIGHT TEST <<<<<<");
121121
sys.puts("");
122122
terminalSetFontAttr(attrs.BRIGHT);
123123
for (var i in colors) {
124-
terminalSetFontColor(colors[i]);
125-
sys.puts(i);
124+
terminalSetFontColor(colors[i]);
125+
sys.puts(i);
126126
}
127127
terminalFontReset();
128128

@@ -206,4 +206,4 @@ exports.resetTerminal = resetTerminal;
206206
exports.test = test;
207207

208208
exports.colors = colors;
209-
exports.attrs = attrs;
209+
exports.attrs = attrs;

0 commit comments

Comments
 (0)