1
0
Fork 0

string printing w/ color

This commit is contained in:
Jan Steemann 2013-01-17 15:03:44 +01:00
parent 913480e881
commit 8160a0183a
1 changed files with 6 additions and 1 deletions

View File

@ -205,6 +205,7 @@
internal.COLORS.COLOR_TRUE = internal.COLORS.COLOR_BOLD_WHITE;
internal.COLORS.COLOR_FALSE = internal.COLORS.COLOR_BOLD_WHITE;
internal.COLORS.COLOR_NULL = internal.COLORS.COLOR_BOLD_WHITE;
internal.COLORS.COLOR_UNDEFINED = internal.COLORS.COLOR_BOLD_WHITE;
internal.NOCOLORS = { };
for (var i in internal.COLORS) {
@ -258,7 +259,9 @@
}
if (typeof(arguments[i]) === "string") {
internal.output(arguments[i]);
internal.output(internal.colors.COLOR_STRING);
internal.output(internal.quoteJsonString(arguments[i]));
internal.output(internal.colors.COLOR_RESET);
}
else {
internal.printRecursive(arguments[i], [], "~", [], 0);
@ -363,7 +366,9 @@
}
}
else if (value === undefined) {
internal.output(internal.colors.COLOR_UNDEFINED);
internal.output("undefined");
internal.output(internal.colors.COLOR_RESET);
}
else {
if (typeof(value) === "string") {